This is an R Markdown document. Markdown is a simple formatting syntax for authoring HTML, PDF, and MS Word documents. For more details on using R Markdown see http://rmarkdown.rstudio.com.
When you click the Knit button a document will be generated that includes both content as well as the output of any embedded R code chunks within the document. You can embed an R code chunk like this:
summary(cars)
## speed dist
## Min. : 4.0 Min. : 2.00
## 1st Qu.:12.0 1st Qu.: 26.00
## Median :15.0 Median : 36.00
## Mean :15.4 Mean : 42.98
## 3rd Qu.:19.0 3rd Qu.: 56.00
## Max. :25.0 Max. :120.00
You can also embed plots, for example:
Note that the echo = FALSE parameter was added to the
code chunk to prevent printing of the R code that generated the
plot.
Section 1 introduces you to Discrete Probability. Section 1 is divided into three parts:
[][* Introduction to Discrete Probability*] A discrete probability distribution counts occurrences that have countable or finite outcomes. [][* Combinations and Permutations*] When the order doesn’t matter, it is a Combination. When the order does matter it is a Permutation] [][* Addition Rule and Monty Hall*] https://www.varsitytutors.com/hotmath/hotmath_help/topics/addition-rule-of-probability https://www.mathgoodies.com/lessons/vol6/addition_rules Google Monty Hall problem
After completing Section 1, you will be able to:
apply basic probability theory to categorical data.
perform a Monte Carlo simulation to approximate the results of repeating an experiment over and over, including simulating the outcomes in the Monty Hall problem.
distinguish between: sampling with and without replacement, events that are and are not independent, and combinations and permutations.
apply the multiplication and addition rules, as appropriate, to calculate the probably of multiple events occurring.
use sapply() instead of a for loop to perform element-wise operations on a function.
There are 3 assignments that use the DataCamp platform for you to practice your coding skills. There are also some quick probability calculations for you to perform directly on the edX platform as well, and there is a longer set of problems at the end of section 1.
This section corresponds to the following section of the course textbook. https://rafalab.github.io/dsbook/probability.html#discrete-probability
We encourage you to use R to interactively test out your answers and further your learning.
We start by covering some basic principles related to categorical data. This subset of probability is referred to as [][discrete probability]. It will help us understand the probability theory we will later introduce for numeric and continuous data, which is more common in data science applications. Discrete probability is more useful in card games and we use these as examples. The word probability is used in everyday language. For example, Google’s auto complete of, what are the chances of, gives us getting pregnant, having twins, and rain tomorrow. Answering questions about probability is often hard, if not impossible. Here, we discuss a mathematical definition of probability that does permit us to give precise answers to certain questions.
For example, if I have two red beads and three blue beads inside an urn and I pick one at random, what is the probability of picking a red one? Our intuition tells us that the answer is 2/5, or 40%. A precise definition can be given by noting that there are five possible outcomes of which two satisfy the condition necessary for the event “pick a red bead.” Because each of the five outcomes has the same chance of occurring, we conclude that the probability is 0.4 for red and 0.6 for blue.
[][A more tangible way to think about the probability of an event is as a proportion of times the event occurs when we repeat the experiment over and over independently and under the same conditions]. Before we continue, let’s introduce some notation. We use the notation probability of A to denote the probability of an event A happening. We use the very general term event to refer to things that can happen when something happens by chance.
For example, in our previous example, the event was picking a red bead. In a political poll, in which we call 100 likely voters at random, an example of an event is calling 48 Democrats and 52 Republicans. [][**In data science applications, we will often deal with continuous variables]. In these cases, events will often be things like, is this person taller than 6 feet? In this case, we write events in a more mathematical form. For example, x greater than 6. We’ll see more of these examples later. Here, we focus on categorical data and discrete probability.
[][Textbook link]
This video corresponds to the textbook section on discrete probability External link. https://rafalab.github.io/dsbook/probability.html#discrete-probability
[][Key points]
The probability of an event is the proportion of times the event occurs when we repeat the experiment independently under the same conditions.
Pr(A) = probability of event A
An event is defined as an outcome that can occur when when something happens by chance.
We can determine probabilities related to discrete variables (picking a red bead, choosing 48 Democrats and 52 Republicans from 100 likely voters) and continuous variables (height over 6 feet).
in data science we will often deal with continuous variables.png
Computers provide a way to actually perform the simple random experiments, such as the one we did before. Pick a bead at random from a bag or an urn with 3 blue beads and 2 red ones. [][Random number generators] permit us to mimic the process of picking at random. An example in R is the sample() function. We demonstrate its use showing you some code. First, use the rep() function to generate the urn. We create an urn with 2 red and 3 blues. You can see when we type beads we see this. Now, we can use a sample() function to pick one at random. If we type sample beads comma 1, in this case, we get a blue. This line of code produces one random outcome. Now, we want to repeat this experiment over and over.
However, it is, of course, impossible to repeat forever. Instead, we repeat the experiment a large enough number of times to make the results practically equivalent to doing it over and over forever. [][This is an example of a Monte Carlo simulation]. Note that much of what mathematical and theoretical statisticians study–something we do not cover in this course–relates to providing rigorous definitions of practically equivalent, as well as studying how close a large number of experiment gets us to what happens in the limit, the limit meaning if we did it forever. [][********Later in this module, we provide a practical approach to deciding what is large enough********].
To perform our first Monte Carlo simulation, we use the replicate() function. This permits us to repeat the same task any number of times we want. Here, we repeat the random event 10,000 times. We set B to be 10,000, then we use the replicate() function to sample from the beads 10,000 times. We can now see if, in fact, our definition is in agreement with this Monte Carlo simulation approximation. We can use table(), for example, to see the distribution. And then we can use prop.table() to give us the proportions. And we see that, in fact, the Monte Carlo simulation gives a very good approximation with 0.5962 for blue and 0.4038 for red. We didn’t get exactly 0.6 and exactly 0.4, but statistical theory tells us that, if we make B large enough, we can get as close as we want to those numbers. We just covered a simple and not very useful example of Monte Carlo simulations.
But we will use Monte Carlo simulation to estimate probabilities in cases in which it is harder to compute the exact ones. Before we go into more complex examples, we still use simple ones to demonstrate the computing tools available in R. Let’s start by noting that we don’t actually have to use replicate() in this particular example. This is because the function sample() has an argument that permits us to pick more than one element from the urn. However, by default, this selection occurs without replacement. After a bead is selected, it is not put back in the urn. Note what happens when we ask to randomly select 5 beads. Let’s do it over and over again. Let’s do it three times. This results in a rearrangement that always has three blue and two red beads. If we asked for six beads, then we get an error. It tells us you don’t have enough beads in here to get six.
This is because it’s doing it without replacement. However, this function, the sample function, can be used directly–again, without the replicate–to repeat the same experiment of picking 1 out of 5 beads over and over under the same conditions. To do this, we sample with replacement. After we pick the bead we put it back in the urn. We can tell sample to do this by changing the replace = argument which defaults to false to true. We do it like this. And when we do this, we see that we get very similar answers to what we got using the replicate function.
[][Textbook link]
This video corresponds to the textbook section on Monte Carlo simulations. https://rafalab.github.io/dsbook/probability.html#monte-carlo-simulations
[][Key points]
Monte Carlo simulations model the probability of different outcomes by repeating a random process a large enough number of times that the results are similar to what would be observed if the process were repeated forever.
The sample() function draws random outcomes from a set of options.
The replicate() function repeats lines of code a set number of times. It is used with sample() and similar functions to run Monte Carlo simulations.
Video code
Note that your exact outcome values from the Monte Carlo simulation will differ because the sampling is random.
beads <- rep(c(“red”, “blue”), times = c(2,3)) # create an urn with 2 red, 3 blue beads # view beads object sample(beads, 1) # sample 1 bead at random
B <- 10000 # number of times to draw 1 bead events <- replicate(B, sample(beads, 1)) # draw 1 bead, B times tab <- table(events) # make a table of outcome counts tab # view count table prop.table(tab) # view table of outcome proportions
beads = rep(c("red", "blue"), times = c(2, 3) )
sample(beads, 100, replace = T)
## [1] "red" "blue" "blue" "blue" "blue" "red" "blue" "blue" "red" "red"
## [11] "blue" "red" "red" "blue" "blue" "red" "red" "blue" "blue" "blue"
## [21] "blue" "red" "blue" "blue" "red" "red" "blue" "red" "blue" "blue"
## [31] "red" "red" "red" "red" "red" "red" "blue" "blue" "blue" "blue"
## [41] "blue" "red" "blue" "red" "red" "blue" "red" "blue" "blue" "blue"
## [51] "red" "red" "blue" "red" "blue" "blue" "red" "blue" "red" "red"
## [61] "blue" "blue" "red" "red" "red" "blue" "blue" "red" "blue" "blue"
## [71] "red" "blue" "blue" "red" "red" "blue" "blue" "blue" "blue" "red"
## [81] "blue" "blue" "blue" "blue" "blue" "blue" "red" "blue" "red" "blue"
## [91] "blue" "red" "blue" "blue" "red" "blue" "red" "blue" "red" "red"
tab = table(sample(beads, 10000, replace = T))
prop.table(tab)
##
## blue red
## 0.601 0.399
The set.seed() function
Before we continue, we will briefly explain the following important line of code:
set.seed(1986)
Throughout this book, we use random number generators. This implies that many of the results presented can actually change by chance, which then suggests that a frozen version of the book may show a different result than what you obtain when you try to code as shown in the book. This is actually fine since the results are random and change from time to time. However, if you want to to ensure that results are exactly the same every time you run them, you can set R’s random number generation seed to a specific number. Above we set it to 1986. We want to avoid using the same seed every time. A popular way to pick the seed is the year - month - day. For example, we picked 1986 on December 20, 2018: 2018 − 12 − 20 = 1986.
You can learn more about setting the seed by looking at the documentation:
?set.seed
In the exercises, we may ask you to set the seed to assure that the results you obtain are exactly what we expect them to be. Important note on seeds in R 3.5 versus R 3.6 and later
When R updated to version 3.6 in early 2019, the default method for setting the seed changed. This means that exercises, videos, textbook excerpts and other code you encounter online may yield a different result based on your version of R.
[][If you are running R 3.6 or later, you can revert to the original seed setting behavior by adding the argument sample.kind=“Rounding”. For example:]
set.seed(1) set.seed(1, sample.kind=“Rounding”) # will make R 3.6 generate a seed as in R 3.5
Using the sample.kind=“Rounding” argument will generate a message:
non-uniform ‘Rounding’ sampler used
This is not a warning or a cause for alarm - it is a confirmation that R is using the alternate seed generation method, and you should expect to receive this message in your console.
If you use R 3.6 or later, you should always use the second form of set.seed() in this course series (outside of DataCamp assignments). Failure to do so may result in an otherwise correct answer being rejected by the grader. In most cases where a seed is required, you will be reminded of this fact.
set.seed(1986, sample.kind="Rounding")
## Warning in set.seed(1986, sample.kind = "Rounding"): non-uniform 'Rounding'
## sampler used
An important application of the mean() function
[][In R, applying the mean() function to a logical vector returns the proportion of elements that are TRUE]. It is very common to use the mean() function in this way to calculate probabilities and we will do so throughout the course.
Suppose you have the vector beads from a previous video:
beads <- rep(c(“red”, “blue”), times = c(2,3)) beads [1] “red” “red” “blue” “blue” “blue”
To find the probability of drawing a blue bead at random, you can run:
mean(beads == “blue”) [1] 0.6
This code is broken down into steps inside R. First, R evaluates the logical statement beads == “blue”, which generates the vector:
FALSE FALSE TRUE TRUE TRUE
When the mean function is applied, R coerces the logical values to numeric values, changing TRUE to 1 and FALSE to 0:
0 0 1 1 1
The mean of the zeros and ones thus gives the proportion of TRUE values. As we have learned and will continue to see, probabilities are directly related to the proportion of events that satisfy a requirement.
[][Defining a distribution for categorical outcomes is relatively straight forward]. We simply assign a probability to each category. In cases that can be thought of as beads in an urn, for each bead type, the proportion defines the distribution. Another example comes from polling. If you’re are randomly calling likely voters from a population that has 44% Democrat, 44% Republican, 10% undecided, and 2% green, these proportions define the probability for each group. For this example, the probability distribution is simply these four proportions.
Again, categorical data makes it easy to define probability distributions. However, later in applications that are more common in data science, we will learn about probability distributions for continuous variables. In this case, it’ll get a little bit more complex. But for now, we’re going to stick to discrete probabilities before we move on.
[][Textbook link]
This video corresponds to the textbook section on probability distributions. https://rafalab.github.io/dsbook/probability.html#discrete-probability-distributions
[][Key points]
The probability distribution for a variable describes the probability of observing each possible outcome.
For discrete categorical variables, the probability distribution is defined by the proportions for each group.
for each bead type, the proportion defines the distribution
categorical data makes it easy to define probability distribution
( A discrete probability distribution counts occurrences that have countable or finite outcomes. This is in contrast to a continuous distribution, where outcomes can fall anywhere on a continuum. Common examples of discrete distribution include the binomial, Poisson, and Bernoulli distributions. )
We say that two events are independent if the outcome of one does not affect the other. This classic example are coin tosses. Every time we toss a fair coin, the probability of seeing heads is one half, regardless of what previous tosses have revealed. The same is true when we pick beads from an urn, with replacement. In the example we saw earlier, the probability of red was 0.40, regardless of previous draws. Many examples of events that are not independent come from card games. When we deal the first card, the probability of getting, say a King, is 1 in 13. This is because there are 13 possibilities. You can get an ace, a two, a three, a four, et cetera, 10, Jack, Queen, or King. Now, if we deal a King for the first card, and I don’t replace it, then the probability of getting a King in the second card is less, because there are only three Kings left. The probability is 3 out of not 52, because we already dealt one card, but out of 51. These events are, therefore, not independent.
[][The first outcome affects the second]. To see an extreme case of non-independent events, consider an example of drawing five beads at random, without replacement, from an urn. Three are blue, two are red. I’m going to generate data like this using the sample() function and assign it to x. You can’t see the outcomes. Now, if I ask you to guess the color of the first bead, what do you guess? Since there’s more blue beads, there’s actually a 0.6 chance of seeing blue. That’s probably what you guess. But now I’m going to show you the outcomes of the other four. The second, third, fourth, and fifth outcomes you can see here. You can see that the three blue beads have already come out. This affects the probability of the first. They are not independent. So would you still guess blue? Of course not. Now you know that the probability of red is 1.
These events are not independent. The probabilities change once you see the other outcomes. When events are not independent, conditional probabilities are useful and necessary to make correct calculations. We already saw an example of a conditional probability. We computed the probability that a second dealt card is a King, given that the first was a King. In probability, we use the following notation. We use this dash like this as a shorthand for given that or conditional on, these are synonyms. Note that, [][when two events, say A and B, are independent, we have the following equation. The probability of A given B is equal to the probability of A]. It doesn’t matter what B is. The probability A is unchanged. This is the mathematical way of saying it. And in fact, this can be considered the mathematical definition of independence.
All right now, if we want to know the probability of two events, say A and B, occurring, we can use the multiplication rule. So the probability of A and B is equal to the probability of A multiplied by the probability of B, given that A already happened. Let’s use blackjack as an example. In blackjack, you get assigned to random cards, without replacement. Then you can ask for more. The goal is to get closer to 21 than the dealer, without going over. Face cards are worth 10 points, so is the 10 card, that’s worth 10 points too. And aces are worth either 11 or 1. So if you get an ace and a face card, you win automatically.
So, in blackjack, to calculate the chances of getting 21 in the following way, first we get an ace. And then we get a face card or a 10. We compute the probability of the first being an ace. And then multiply by the probability of a face card or a 10, given that the first card was an ace. The calculation is 1 over 13 chance of getting an ace, times chance of getting a card with value 10, given that we already saw an ace, which is 16 out of 51. We’ve already taken one card out. This is approximately 2%. The multiplicative rule also applies to more than two events. We can use induction to expand for more than two. So the probability of A and B and C is equal to the probability of A times our probability of B, given that A happen, times the probability of C, that A and B happen.
When we have independent events, the multiplication rule becomes simpler. We simply multiply of three probabilities. But we have to be very careful when we use the multiplicative rule in practice. We’re assuming independence. And this can result in very different and incorrect probability calculations when we don’t actually have independence. This can have dire consequences. For example, in a trial, if an expert doesn’t really know the multiplication rule and how to use it. So let’s use an example. This is loosely based on something that actually happened. Imagine a court case in which the suspect was described to have a mustache and a beard. And the prosecution brings in an expert to argue that because 1 in 10 men have beards, and 1 in 5 men has mustaches, using the multiplication rule, this means that only 2% of men have both beards and mustaches, 1/10 times 1/5. 2% is a pretty unlikely event. However, to multiply like this, we need to assume independence. And in this case, it’s clearly not true. The conditional probability of a man having a mustache, conditional on them having a beard, is quite high. It’s about 95%. So the correct calculation actually gives us a much higher probability. It’s 9%, so there’s definitely reasonable doubt.
[][Textbook link]
This video corresponds to the textbook section on independence, conditional probability and the multiplication rule. https://rafalab.github.io/dsbook/probability.html#independence
[][Key points]
Conditional probabilities compute the probability that an event occurs given information about dependent events. For example, the probability of drawing a second king given that the first draw is a king is:
[][ Pr(Card 2 is kind | Card 1 is king) = 3/51]
[][ If two events A and B are independent, Pr(A|B) = Pr(A)] . To determine the probability of multiple events occurring, we use the multiplication rule.
Equations
The multiplication rule for independent events is:
[][ Pr(A and B and C) = Pr(A) x Pr(B) x Pr(c)]
The multiplication rule for dependent events considers the conditional probability of both events occurring:
[][ Pr(A and B) = Pr(A) x Pr(B|A)]
We can expand the multiplication rule for dependent events to more than 2 events:
[][ Pr(A and B and C) = Pr(A) x Pr(B|A) x Pr(C| A and B)]
with replacement
The first outcome affects the second
not independent events are without replacement card games.png
compute the probability that the second dealt card is king, given that the first was king
so the probability of a and b is equal to the probability of a multiplied by the probability of b given that a already happened.png
assume independence, not true at all.png
question posted 2 days ago by john_hhu2020
Sorry I don’t get it, I thought it was 95%, since the instructor mentioned below in the video:
Pr(mustache | beard) = 0.95
I don’t know how does this comes out (this answer or the answer on the book, since it mentioned this: “1/10×95/100=0.095” under this hypothesis: “Say the conditional probability of a man having a mustache conditional on him having a beard is .95”). Say if we applies the multiplicative rule here:
Pr(m and B) = Pr(m) x Pr(b|m)
and since we have 10 sample, Pr(m) = 1/5, Pr(b) = 1/10, then what is the probability of Pr(b|m)? And whats the difference between Pr(b and m) and Pr(b|m), as I cant image the situation of these.
The question is: in this case, what is the difference between Pr(b and m) and Pr(b|m) ??? This post is visible to everyone. 0 responses
john_hhu2020
less than a minute ago
I see, so the conditionally probability means a situation change: both Numerator and Denominator was changed due to the first event have happened. Thus the Pr(mustache | beard) must be given, and only then we can calculate the Pr(mustache and beard), and this Pr(mustache and beard) means the probability of guy met both conditions in the first condition - the Numerator and Denominator haven’t changed. Anyone willing to help please write something, especially the instructor
Assessment due Jun 15, 2022 10:43 AWST
1/1 point (graded)
One ball will be drawn at random from a box containing: 3 cyan balls, 5 magenta balls, and 7 yellow balls. What is the probability that the ball will be cyan? correct
Loading You have used 1 of 5 attempts Some problems have options such as save, reset, hints, or show answer. These options follow the Submit button. Correct (1/1 point)
1/1 point (graded)
One ball will be drawn at random from a box containing: 3 cyan balls, 5 magenta balls, and 7 yellow balls. What is the probability that the ball will not be cyan? correct
Loading You have used 1 of 5 attempts Some problems have options such as save, reset, hints, or show answer. These options follow the Submit button. Correct (1/1 point)
1/1 point (graded)
Instead of taking just one draw, consider taking two draws. You take the second draw without returning the first draw to the box. We call this sampling without replacement. What is the probability that the first draw is cyan and that the second draw is not cyan?
Provide at least 3 significant digits. correct
Loading You have used 1 of 5 attempts Some problems have options such as save, reset, hints, or show answer. These options follow the Submit button. Correct (1/1 point)
1/1 point (graded)
Now repeat the experiment, but this time, after taking the first draw and recording the color, return it back to the box and shake the box. We call this sampling with replacement. What is the probability that the first draw is cyan and that the second draw is not cyan? correct
Loading You have used 1 of 5 attempts Some problems have options such as save, reset, hints, or show answer. These options follow the Submit button. Correct (1/1 point)
Have a question about these assessments? Search the discussion forum BEFORE posting below.
Some reminders:
Please be specific in the title and body of your post regarding which question you're asking about to facilitate answering your question.
Posting snippets of code is okay, but posting full code solutions is not.
If you do post snippets of code, please format it as code for readability. If you're not sure how to do this, there are instructions in a pinned post in the discussion forum.
Discussion: Assessment: Introduction to discrete probability’ Topic: Section 1 / Assessment: Introduction to discrete probability
a box containing: 3 cyan balls, 5 magenta balls, and 7 yellow balls.
Pr(A) Cyan
Pr(B) not Cyan
Pr(A and B) = Pr(A) x Pr(B|A) = 3/15 x 12/14 = 1/5 x 6/7 = 6/35
3/15 x 12/15 1/5 x 4/5 4/25
DataCamp
You are about the take the first DataCamp assessment. In this course we will be using the DataCamp platform for some assessments. DataCamp provides an R console and and a script editor right here on your browser. Here we give a brief DataCamp tutorial. If you are already familiar with DataCamp you can skip this section and proceed to the next section
To start a DataCamp assessment, you will click on the button that says [][Click here to start the assessment], which looks like this: Click here to start the assessment picture of start the assessment button. You will see a button like this one in the next section: [][Assessment: Introduction to Discrete Probability].
The DataCamp interface has four panels. They are:
The Information Panel: General information about the assessment.
The Instructions Panel: Exercise instructions. The multiple choice questions appear here when applicable.
The Editor: Here is where you type and edit your answers in the form of an R script. Example code also appears here. The editor also includes reminders of the instructions. Note that # denotes comments. These are not run as code, instead, they tell others what your code is about!
R console: This is where R commands get executed. You can send commands from the editor to the console but you can also type in commands directly to test out code.
Here is a screenshot of what DataCamp looks like:
Image of DataCamp Platform
There are two ways to send commands from the editor to the console:
If you hit the Submit Answer button, the entire code in the editor gets executed and your answer is evaluated. Remember, after you click Submit Answer in an assessment, your code will be evaluated. If you do not take the hint, you get unlimited tries.
If your cursor is on the editor and you hit command-return on a Mac or control-return on Windows, that line gets executed in the console. You do not submit an answer when you do this. This is a good way to test your script before you submit.
Tip: DataCamp suggests useful keyboard shortcuts after most exercises.
After submit answer on the platform
Assessment due Jun 15, 2022 10:43 AWST
This assessment covers the basics of discrete probability. There are two parts to this assessment: the first part is a set of questions on the edX platform, and the second part is a set of coding questions on the DataCamp platform.
In this assessment, you will learn about the fundamentals of discrete probability through looking at examples of sampling from an urn with and without replacement.
By clicking OK, you agree to DataCamp’s privacy policy: https://www.datacamp.com/privacy-policy. Note that you might need to disable your pop-up blocker, or allow “www.datacamp.com” in your pop-up blocker allowed list. When you have completed the exercises, return to edX to continue your learning.
Assessment: Introduction to discrete probability (External resource) (4.5 points possible) By clicking OK, you agree to DataCamp’s privacy policy: https://www.datacamp.com/privacy-policy. https://courses.edx.org/courses/course-v1:HarvardX+PH125.3x+1T2022/xblock/block-v1:HarvardX+PH125.3x+1T2022+type@lti_consumer+block@f8d6dedea9284f2bb67b368dc05d0a38/handler/lti_launch_handler You must be logged in to DataCamp to view your lab scores. To log in, simply click on one of the launch links above (even if you’re not planning to work on a lab right now, but just want to view your scores). Then, refresh this page to view your scores.
Have a question about this assessment? Search the discussion forum to see if someone else has asked or answered your question BEFORE posting below.
Some reminders:
Please be specific in the title and body of your post regarding which question you're asking about to facilitate answering your question.
Posting snippets of code is okay, but posting full code solutions is not.
If you do post snippets of code, please format it as code for readability. If you're not sure how to do this, there are instructions in a pinned post in the general discussion forum.
Discussion: DataCamp Assessment: Introduction to discrete probability Topic: Section 1 / DataCamp Assessment: Introduction to discrete probability
In the edX exercises for this section, we calculated some probabilities by hand. Now we’ll calculate those probabilities using R.
One ball will be drawn at random from a box containing: 3 cyan balls, 5 magenta balls, and 7 yellow balls.
What is the probability that the ball will be cyan? Instructions 70 XP
Define a variable p as the probability of choosing a cyan ball from the box.
Print the value of p.
Hint
Calculate the proportion of balls in the box that are cyan and assign that value to the variable p.
To print the contents of a variable, write the variable name in a new line of code.
cyan <- 3
magenta <- 5
yellow <- 7
# Assign a variable `p` as the probability of choosing a cyan ball from the box
#p <- rep(c("cyan", "magenta", "yellow"), times=c(3, 5, 7))
p <- cyan/(cyan + magenta + yellow)
# Print the variable `p` to the console
p
## [1] 0.2
We defined the variable p as the probability of choosing a cyan ball from a box containing: 3 cyan balls, 5 magenta balls, and 7 yellow balls.
What is the probability that the ball you draw from the box will NOT be cyan? Instructions 100 XP
Using the probability of choosing a cyan ball, p, calculate the probability of choosing any other ball.
# `p` is defined as the probability of choosing a cyan ball from a box containing: 3 cyan balls, 5 magenta balls, and 7 yellow balls.
# Using variable `p`, calculate the probability of choosing any ball that is not cyan from the box
1-p
## [1] 0.8
Instead of taking just one draw, consider taking two draws. You take the second draw without returning the first draw to the box. We call this sampling without replacement.
What is the probability that the first draw is cyan and that the second draw is not cyan? Instructions 100 XP
Calculate the conditional probability p_2 of choosing a ball that is not cyan after one cyan ball has been removed from the box.
Calculate the joint probability of both choosing a cyan ball on the first draw and a ball that is not cyan on the second draw using p_1 and p_2.
cyan <- 3
magenta <- 5
yellow <- 7
# The variable `p_1` is the probability of choosing a cyan ball from the box on the first draw.
p_1 <- cyan / (cyan + magenta + yellow)
# Assign a variable `p_2` as the probability of not choosing a cyan ball on the second draw without replacement.
# Calculate the probability that the first draw is cyan and the second draw is not cyan using `p_1` and `p_2`.
# The variable `p_1` is the probability of choosing a cyan ball from the box on the first draw.
p_1 <- cyan / (cyan + magenta + yellow)
p_1
## [1] 0.2
# Assign a variable `p_2` as the probability of not choosing a cyan ball on the second draw without replacement.
p_2 <- (magenta + yellow)/(cyan + magenta + yellow - 1)
p_2
## [1] 0.8571429
# Calculate the probability that the first draw is cyan and the second draw is not cyan using `p_1` and `p_2`.
p_1 * p_2
## [1] 0.1714286
Now repeat the experiment, but this time, after taking the first draw and recording the color, return it back to the box and shake the box. We call this sampling with replacement.
What is the probability that the first draw is cyan and that the second draw is not cyan? Instructions 100 XP
Calculate the probability p_2 of choosing a ball that is not cyan on the second draw, with replacement.
Next, use p_1 and p_2 to calculate the probability of choosing a cyan ball on the first draw and a ball that is not cyan on the second draw (after replacing the first ball).
cyan <- 3
magenta <- 5
yellow <- 7
# The variable 'p_1' is the probability of choosing a cyan ball from the box on the first draw.
p_1 <- cyan / (cyan + magenta + yellow)
# Assign a variable 'p_2' as the probability of not choosing a cyan ball on the second draw with replacement.
p_2 <- 1- p_1
# Calculate the probability that the first draw is cyan and the second draw is not cyan using `p_1` and `p_2`.
p_1 * p_2
## [1] 0.16
# Solution =====================================================================================================================
cyan <- 3
magenta <- 5
yellow <- 7
# The variable 'p_1' is the probability of choosing a cyan ball from the box on the first draw.
p_1 <- cyan / (cyan + magenta + yellow)
# Assign a variable 'p_2' as the probability of not choosing a cyan ball on the second draw with replacement.
p_2 <- 1 - (cyan) / (cyan + magenta + yellow)
# Calculate the probability that the first draw is cyan and the second draw is not cyan using `p_1` and `p_2`.
p_1 * p_2
## [1] 0.16
This is the end of the programming assignment for this section. Please DO NOT click through to additional assessments from this page. Please DO answer the question on this page. If you do click through, your scores may NOT be recorded.
Click on “Awesome” to get the “points” for this question and then return to the course on edX.
You can close this window and return to Data Science: Probability. Answer the question 50XP Possible Answers
Awesome
press
1
Nope
press
2
In our very first example, we imagine an urn with 5 beads–3 blue, 2 red. To review, to compute the probability distribution of 1 draw, we simply listed out all the possibilities– there were 5–and then for each event, we counted how many of these possibilities were associated with that event. So for example, for the blue beads the probability is 0.6. For more complicated examples, however, these computations are not necessarily straightforward. [][For example, what does the probability that if I draw 5 cards without replacement, I get all cards of the same suit, what is called a flush in poker?]
Discrete probability teaches us how to make these computations using mathematics. Here we focus on how to use R code. So we’re going to use card games as examples. So let’s start by constructing a deck of cards using R. For this, we will use the function [][expand.grid()] and the function [][Paste()]. We use Paste to create strings by joining smaller strings. For example, if we have the number and the suit for a card, in 2 different variables we can create the card name using Paste like this. It also works on pairs of vectors. It performs the operation element-wise. So if we type this line of code, we get the following result. The function expand.grid gives us all the combinations of 2 lists ([][the outcome of expand.grid function is a data.frame, be careful with this]). So for example, if you have blue and black pants and white, gray, and plaid shirt, all your combinations can be computed using the expand.grid function like this. You can see all 6 combinations.
So here’s how we generate a deck of cards. We define the four suits, we define the 13 numbers, and then we create the deck using expand.grid and then pasting together the 2 columns that expand.grid creates. Now that we have a deck constructed, we can now start answering questions about probability. Let’s start by doing something simple. Let’s double-check that the probability of a king in the first card is 1 in 13 with R code. We simply [][compute the proportion of possible outcomes that satisfy our condition]. So we create a vector that contains the four ways we can get a king. That’s going to be the kings variable. And then we simply check what proportion of the deck is one of these cards and we get the answer that we expect–0.076 dot dot dot, which is 1 in 13.
Now, ******how about the conditional probability of the second card being a king, given that the first was a king?****** Earlier we deduced that if 1 king is already out, then there’s 51 left. So the probability is 3 in 51. But let’s confirm by listing out all possible outcomes. To do this, we’re going to use [][the combinations() and permutations() functions that are available from the gtools package]. The permutations function computes for any list of size n all the different ways we can select R items. So here’s an example–here all the ways we can choose 2 numbers from the list 1, 2, 3, 4, 5. Notice that the order matters with the permutations() function. So 3, 1 is different than 1, 3, So it appears in our permutations. Also notice that 1, 1; 2, 2; and 3, 3 don’t appear, because once we pick a number, it can’t appear again (no replacement). Optionally for this function permutations, we can add a vector. So for example, if you want to see 5 random 7-digit phone numbers out of all possible phone numbers, you could type code like this. Here we’re defining a vector of digits that goes from 0 to 9 rather than 1 through 10. So these four lines of code generate all phone numbers, picks 5 at random, and then shows them to you.
To compute all possible ways that we can choose 2 cards
when the order matters, we simply type the following piece
of code. [][Here we use permutations() function. There’s 52
cards, we’re going to choose 2, and we’re going to select them out of
the vector that includes our card names, which we called deck
earlier]. This is going to be a matrix with 2 dimensions, 2
columns, and in this case, it’s going to have 2,652 rows
(possibilities). Those are all the permutations. Now, we’re
going to define the first card and the second card by grabbing the first
and second columns using this simple piece of code. And now we can,
for example, check how many cases have a first card that is a
king–that’s 204. [][And now to find the conditional
probability, we ask what fraction of these 204 have also a king in the
second card]. So this case we type the following piece of
code. We add all the cases that have king in the first, king in the
second, and divide by the cases that have a king in the first.
# ======================================== Read it, Read it, Read it
================================================================================
And now we get the answer 0.058 dot dot dot, which is exactly 3 out of 51, which we had already deduced. Note that the code we just saw is equivalent to this piece of code where we compute the proportions instead of the totals. And this also gives us the answer that we want, 3 out of 51. This is an R version of the multiplication rule, which tells us the probability of B, given A, is equal to proportion of A and B, or the probability of A and B, divided by the proportion of A or the probability of A. [][Now, what if the order does not matter?] For example, in blackjack, if you get an ace and a face card or a 10, it’s called a natural 21, and you win automatically. If we want to compute the probability of this happening, we want to enumerate the combinations, not permutations, since the order doesn’t matter. So if we get an A and a king, king and an A, it’s still a 21. We don’t want to count that twice. So notice the difference between the permutations functions, which lists all permutations, and the combination function, where order does not matter.
This means that 2, 1 doesn’t appear because 1, 2 already appeared. Similarly, 3, 1 and 3, 2 don’t appear. So to compute the probability of a natural 21 in blackjack, we can do this. We can define a vector that includes all the aces, a vector that includes all the face cards, then we generate all the combinations of picking 2 cards out of 52, and then we simply count. [][How often do we get aces and a face card?] And we get the answer 0.048 dot, dot, dot. Now, notice that in the previous piece of code we assumed that the aces come first. This is only because we know the way that combination generates and enumerates possibilities. But if we want to be safe, we can instead type this code, which considers both possibilities. We get the same answer, and again, this is because we know how combinations works and how it lists the possibilities.
Instead of using combinations to deduce the exact probability of a natural 21, we can also use a Monte Carlo to estimate this probability. In this case, we draw two cards over and over and keep track of how many 21’s we get. We can use the function sample to draw a card without a replacement like this. Here’s 1 hand. We didn’t get a 21 there. And then check if 1 card is an ace and the other is a face card or a 10. Now we simply repeat this over and over and we get a very good approximation–in this case, 0.0488.
[][Textbook link]
Here is a link to the textbook section on combinations and permutations External link. https://rafalab.github.io/dsbook/probability.html#combinations-and-permutations
[][Key points]
paste() joins two strings and inserts a space in between.
expand.grid() gives the combinations of 2 vectors or lists.
permutations(n,r) from the gtools package lists the different ways that r items can be selected from a set of n options when order matters.
combinations(n,r) from the gtools package lists the different ways that r items can be selected from a set of n options when order does not matter.
Code: Introducing paste() and expand.grid()
number <- “Three” suit <- “Hearts” paste(number, suit)
paste(letters[1:5], as.character(1:5))
expand.grid(pants = c(“blue”, “black”), shirt = c(“white”, “grey”, “plaid”))
Code: Generating a deck of cards
suits <- c(“Diamonds”, “Clubs”, “Hearts”, “Spades”) numbers <- c(“Ace”, “Deuce”, “Three”, “Four”, “Five”, “Six”, “Seven”, “Eight”, “Nine”, “Ten”, “Jack”, “Queen”, “King”) deck <- expand.grid(number = numbers, suit = suits) deck <- paste(deck\(number, deck\)suit)
kings <- paste(“King”, suits) mean(deck %in% kings)
Code: Permutations and combinations
Correction: The code shown does not generate all 7 digit phone numbers because phone numbers can have repeated digits. It generates all possible 7 digit numbers without repeats.
library(gtools) permutations(5,2) # ways to choose 2 numbers in order from 1:5 all_phone_numbers <- permutations(10, 7, v = 0:9) n <- nrow(all_phone_numbers) index <- sample(n, 5) all_phone_numbers[index,]
permutations(3,2) # order matters combinations(3,2) # order does not matter
Code: Probability of drawing a second king given that one king is drawn
hands <- permutations(52,2, v = deck) first_card <- hands[,1] second_card <- hands[,2] sum(first_card %in% kings)
sum(first_card %in% kings & second_card %in% kings) / sum(first_card %in% kings)
Code: Probability of a natural 21 in blackjack
aces <- paste(“Ace”, suits) facecard <- c(“King”, “Queen”, “Jack”, “Ten”) facecard <- expand.grid(number = facecard, suit = suits) facecard <- paste(facecard\(number, facecard\)suit)
hands <- combinations(52, 2, v=deck) # all possible hands
combinationsmean(hands[,1] %in% aces & hands[,2] %in% facecard)
mean((hands[,1] %in% aces & hands[,2] %in% facecard)|(hands[,2] %in% aces & hands[,1] %in% facecard))
Code: Monte Carlo simulation of natural 21 in blackjack
Note that your exact values will differ because the process is random and the seed is not set.
hand <- sample(deck, 2) hand
B <- 10000 results <- replicate(B, { hand <- sample(deck, 2) (hand[1] %in% aces & hand[2] %in% facecard) | (hand[2] %in% aces & hand[1] %in% facecard) }) mean(results)
number <- "Three"
suit <- "Hearts"
paste(number, suit)
## [1] "Three Hearts"
paste(letters[1:5], as.character(1:5))
## [1] "a 1" "b 2" "c 3" "d 4" "e 5"
expand.grid(pants = c("blue", "black"), shirt = c("white", "gray", "plaid"))
## pants shirt
## 1 blue white
## 2 black white
## 3 blue gray
## 4 black gray
## 5 blue plaid
## 6 black plaid
suits <- c("Diamonds", "Clubs", "Hearts", "Spades")
numbers <- c("Ace", "Deuce", "Three", "Four", "Five", "Six", "Seven", "Eight", "Nine", "Ten", "Jack", "Queen", "King")
deck <- expand.grid(suit = suits, number = numbers)
length(deck[, 1])
## [1] 52
head(deck)
## suit number
## 1 Diamonds Ace
## 2 Clubs Ace
## 3 Hearts Ace
## 4 Spades Ace
## 5 Diamonds Deuce
## 6 Clubs Deuce
deck <- paste(deck$suit, deck$number)
length(deck)
## [1] 52
deck
## [1] "Diamonds Ace" "Clubs Ace" "Hearts Ace" "Spades Ace"
## [5] "Diamonds Deuce" "Clubs Deuce" "Hearts Deuce" "Spades Deuce"
## [9] "Diamonds Three" "Clubs Three" "Hearts Three" "Spades Three"
## [13] "Diamonds Four" "Clubs Four" "Hearts Four" "Spades Four"
## [17] "Diamonds Five" "Clubs Five" "Hearts Five" "Spades Five"
## [21] "Diamonds Six" "Clubs Six" "Hearts Six" "Spades Six"
## [25] "Diamonds Seven" "Clubs Seven" "Hearts Seven" "Spades Seven"
## [29] "Diamonds Eight" "Clubs Eight" "Hearts Eight" "Spades Eight"
## [33] "Diamonds Nine" "Clubs Nine" "Hearts Nine" "Spades Nine"
## [37] "Diamonds Ten" "Clubs Ten" "Hearts Ten" "Spades Ten"
## [41] "Diamonds Jack" "Clubs Jack" "Hearts Jack" "Spades Jack"
## [45] "Diamonds Queen" "Clubs Queen" "Hearts Queen" "Spades Queen"
## [49] "Diamonds King" "Clubs King" "Hearts King" "Spades King"
kings <- paste(suits, "King")
kings
## [1] "Diamonds King" "Clubs King" "Hearts King" "Spades King"
mean(deck %in% kings)
## [1] 0.07692308
#mean(length(kings)/length(deck))
# this is how I think calculating probability of second card being king given that the first card is already a king
# ============================================================================================================================
mean((length(kings)-1)/(length(deck)-1))
## [1] 0.05882353
library(gtools)
head(permutations(5, 2))
## [,1] [,2]
## [1,] 1 2
## [2,] 1 3
## [3,] 1 4
## [4,] 1 5
## [5,] 2 1
## [6,] 2 3
length(permutations(52, 2)[, 1]) # Dont forget after permutation or combinations, you'll have two dimensional df =================================
## [1] 2652
length(combinations(52, 2)[, 1])
## [1] 1326
data.frame(permutations(52, 2, v = deck))
## X1 X2
## 1 Clubs Ace Clubs Deuce
## 2 Clubs Ace Clubs Eight
## 3 Clubs Ace Clubs Five
## 4 Clubs Ace Clubs Four
## 5 Clubs Ace Clubs Jack
## 6 Clubs Ace Clubs King
## 7 Clubs Ace Clubs Nine
## 8 Clubs Ace Clubs Queen
## 9 Clubs Ace Clubs Seven
## 10 Clubs Ace Clubs Six
## 11 Clubs Ace Clubs Ten
## 12 Clubs Ace Clubs Three
## 13 Clubs Ace Diamonds Ace
## 14 Clubs Ace Diamonds Deuce
## 15 Clubs Ace Diamonds Eight
## 16 Clubs Ace Diamonds Five
## 17 Clubs Ace Diamonds Four
## 18 Clubs Ace Diamonds Jack
## 19 Clubs Ace Diamonds King
## 20 Clubs Ace Diamonds Nine
## 21 Clubs Ace Diamonds Queen
## 22 Clubs Ace Diamonds Seven
## 23 Clubs Ace Diamonds Six
## 24 Clubs Ace Diamonds Ten
## 25 Clubs Ace Diamonds Three
## 26 Clubs Ace Hearts Ace
## 27 Clubs Ace Hearts Deuce
## 28 Clubs Ace Hearts Eight
## 29 Clubs Ace Hearts Five
## 30 Clubs Ace Hearts Four
## 31 Clubs Ace Hearts Jack
## 32 Clubs Ace Hearts King
## 33 Clubs Ace Hearts Nine
## 34 Clubs Ace Hearts Queen
## 35 Clubs Ace Hearts Seven
## 36 Clubs Ace Hearts Six
## 37 Clubs Ace Hearts Ten
## 38 Clubs Ace Hearts Three
## 39 Clubs Ace Spades Ace
## 40 Clubs Ace Spades Deuce
## 41 Clubs Ace Spades Eight
## 42 Clubs Ace Spades Five
## 43 Clubs Ace Spades Four
## 44 Clubs Ace Spades Jack
## 45 Clubs Ace Spades King
## 46 Clubs Ace Spades Nine
## 47 Clubs Ace Spades Queen
## 48 Clubs Ace Spades Seven
## 49 Clubs Ace Spades Six
## 50 Clubs Ace Spades Ten
## 51 Clubs Ace Spades Three
## 52 Clubs Deuce Clubs Ace
## 53 Clubs Deuce Clubs Eight
## 54 Clubs Deuce Clubs Five
## 55 Clubs Deuce Clubs Four
## 56 Clubs Deuce Clubs Jack
## 57 Clubs Deuce Clubs King
## 58 Clubs Deuce Clubs Nine
## 59 Clubs Deuce Clubs Queen
## 60 Clubs Deuce Clubs Seven
## 61 Clubs Deuce Clubs Six
## 62 Clubs Deuce Clubs Ten
## 63 Clubs Deuce Clubs Three
## 64 Clubs Deuce Diamonds Ace
## 65 Clubs Deuce Diamonds Deuce
## 66 Clubs Deuce Diamonds Eight
## 67 Clubs Deuce Diamonds Five
## 68 Clubs Deuce Diamonds Four
## 69 Clubs Deuce Diamonds Jack
## 70 Clubs Deuce Diamonds King
## 71 Clubs Deuce Diamonds Nine
## 72 Clubs Deuce Diamonds Queen
## 73 Clubs Deuce Diamonds Seven
## 74 Clubs Deuce Diamonds Six
## 75 Clubs Deuce Diamonds Ten
## 76 Clubs Deuce Diamonds Three
## 77 Clubs Deuce Hearts Ace
## 78 Clubs Deuce Hearts Deuce
## 79 Clubs Deuce Hearts Eight
## 80 Clubs Deuce Hearts Five
## 81 Clubs Deuce Hearts Four
## 82 Clubs Deuce Hearts Jack
## 83 Clubs Deuce Hearts King
## 84 Clubs Deuce Hearts Nine
## 85 Clubs Deuce Hearts Queen
## 86 Clubs Deuce Hearts Seven
## 87 Clubs Deuce Hearts Six
## 88 Clubs Deuce Hearts Ten
## 89 Clubs Deuce Hearts Three
## 90 Clubs Deuce Spades Ace
## 91 Clubs Deuce Spades Deuce
## 92 Clubs Deuce Spades Eight
## 93 Clubs Deuce Spades Five
## 94 Clubs Deuce Spades Four
## 95 Clubs Deuce Spades Jack
## 96 Clubs Deuce Spades King
## 97 Clubs Deuce Spades Nine
## 98 Clubs Deuce Spades Queen
## 99 Clubs Deuce Spades Seven
## 100 Clubs Deuce Spades Six
## 101 Clubs Deuce Spades Ten
## 102 Clubs Deuce Spades Three
## 103 Clubs Eight Clubs Ace
## 104 Clubs Eight Clubs Deuce
## 105 Clubs Eight Clubs Five
## 106 Clubs Eight Clubs Four
## 107 Clubs Eight Clubs Jack
## 108 Clubs Eight Clubs King
## 109 Clubs Eight Clubs Nine
## 110 Clubs Eight Clubs Queen
## 111 Clubs Eight Clubs Seven
## 112 Clubs Eight Clubs Six
## 113 Clubs Eight Clubs Ten
## 114 Clubs Eight Clubs Three
## 115 Clubs Eight Diamonds Ace
## 116 Clubs Eight Diamonds Deuce
## 117 Clubs Eight Diamonds Eight
## 118 Clubs Eight Diamonds Five
## 119 Clubs Eight Diamonds Four
## 120 Clubs Eight Diamonds Jack
## 121 Clubs Eight Diamonds King
## 122 Clubs Eight Diamonds Nine
## 123 Clubs Eight Diamonds Queen
## 124 Clubs Eight Diamonds Seven
## 125 Clubs Eight Diamonds Six
## 126 Clubs Eight Diamonds Ten
## 127 Clubs Eight Diamonds Three
## 128 Clubs Eight Hearts Ace
## 129 Clubs Eight Hearts Deuce
## 130 Clubs Eight Hearts Eight
## 131 Clubs Eight Hearts Five
## 132 Clubs Eight Hearts Four
## 133 Clubs Eight Hearts Jack
## 134 Clubs Eight Hearts King
## 135 Clubs Eight Hearts Nine
## 136 Clubs Eight Hearts Queen
## 137 Clubs Eight Hearts Seven
## 138 Clubs Eight Hearts Six
## 139 Clubs Eight Hearts Ten
## 140 Clubs Eight Hearts Three
## 141 Clubs Eight Spades Ace
## 142 Clubs Eight Spades Deuce
## 143 Clubs Eight Spades Eight
## 144 Clubs Eight Spades Five
## 145 Clubs Eight Spades Four
## 146 Clubs Eight Spades Jack
## 147 Clubs Eight Spades King
## 148 Clubs Eight Spades Nine
## 149 Clubs Eight Spades Queen
## 150 Clubs Eight Spades Seven
## 151 Clubs Eight Spades Six
## 152 Clubs Eight Spades Ten
## 153 Clubs Eight Spades Three
## 154 Clubs Five Clubs Ace
## 155 Clubs Five Clubs Deuce
## 156 Clubs Five Clubs Eight
## 157 Clubs Five Clubs Four
## 158 Clubs Five Clubs Jack
## 159 Clubs Five Clubs King
## 160 Clubs Five Clubs Nine
## 161 Clubs Five Clubs Queen
## 162 Clubs Five Clubs Seven
## 163 Clubs Five Clubs Six
## 164 Clubs Five Clubs Ten
## 165 Clubs Five Clubs Three
## 166 Clubs Five Diamonds Ace
## 167 Clubs Five Diamonds Deuce
## 168 Clubs Five Diamonds Eight
## 169 Clubs Five Diamonds Five
## 170 Clubs Five Diamonds Four
## 171 Clubs Five Diamonds Jack
## 172 Clubs Five Diamonds King
## 173 Clubs Five Diamonds Nine
## 174 Clubs Five Diamonds Queen
## 175 Clubs Five Diamonds Seven
## 176 Clubs Five Diamonds Six
## 177 Clubs Five Diamonds Ten
## 178 Clubs Five Diamonds Three
## 179 Clubs Five Hearts Ace
## 180 Clubs Five Hearts Deuce
## 181 Clubs Five Hearts Eight
## 182 Clubs Five Hearts Five
## 183 Clubs Five Hearts Four
## 184 Clubs Five Hearts Jack
## 185 Clubs Five Hearts King
## 186 Clubs Five Hearts Nine
## 187 Clubs Five Hearts Queen
## 188 Clubs Five Hearts Seven
## 189 Clubs Five Hearts Six
## 190 Clubs Five Hearts Ten
## 191 Clubs Five Hearts Three
## 192 Clubs Five Spades Ace
## 193 Clubs Five Spades Deuce
## 194 Clubs Five Spades Eight
## 195 Clubs Five Spades Five
## 196 Clubs Five Spades Four
## 197 Clubs Five Spades Jack
## 198 Clubs Five Spades King
## 199 Clubs Five Spades Nine
## 200 Clubs Five Spades Queen
## 201 Clubs Five Spades Seven
## 202 Clubs Five Spades Six
## 203 Clubs Five Spades Ten
## 204 Clubs Five Spades Three
## 205 Clubs Four Clubs Ace
## 206 Clubs Four Clubs Deuce
## 207 Clubs Four Clubs Eight
## 208 Clubs Four Clubs Five
## 209 Clubs Four Clubs Jack
## 210 Clubs Four Clubs King
## 211 Clubs Four Clubs Nine
## 212 Clubs Four Clubs Queen
## 213 Clubs Four Clubs Seven
## 214 Clubs Four Clubs Six
## 215 Clubs Four Clubs Ten
## 216 Clubs Four Clubs Three
## 217 Clubs Four Diamonds Ace
## 218 Clubs Four Diamonds Deuce
## 219 Clubs Four Diamonds Eight
## 220 Clubs Four Diamonds Five
## 221 Clubs Four Diamonds Four
## 222 Clubs Four Diamonds Jack
## 223 Clubs Four Diamonds King
## 224 Clubs Four Diamonds Nine
## 225 Clubs Four Diamonds Queen
## 226 Clubs Four Diamonds Seven
## 227 Clubs Four Diamonds Six
## 228 Clubs Four Diamonds Ten
## 229 Clubs Four Diamonds Three
## 230 Clubs Four Hearts Ace
## 231 Clubs Four Hearts Deuce
## 232 Clubs Four Hearts Eight
## 233 Clubs Four Hearts Five
## 234 Clubs Four Hearts Four
## 235 Clubs Four Hearts Jack
## 236 Clubs Four Hearts King
## 237 Clubs Four Hearts Nine
## 238 Clubs Four Hearts Queen
## 239 Clubs Four Hearts Seven
## 240 Clubs Four Hearts Six
## 241 Clubs Four Hearts Ten
## 242 Clubs Four Hearts Three
## 243 Clubs Four Spades Ace
## 244 Clubs Four Spades Deuce
## 245 Clubs Four Spades Eight
## 246 Clubs Four Spades Five
## 247 Clubs Four Spades Four
## 248 Clubs Four Spades Jack
## 249 Clubs Four Spades King
## 250 Clubs Four Spades Nine
## 251 Clubs Four Spades Queen
## 252 Clubs Four Spades Seven
## 253 Clubs Four Spades Six
## 254 Clubs Four Spades Ten
## 255 Clubs Four Spades Three
## 256 Clubs Jack Clubs Ace
## 257 Clubs Jack Clubs Deuce
## 258 Clubs Jack Clubs Eight
## 259 Clubs Jack Clubs Five
## 260 Clubs Jack Clubs Four
## 261 Clubs Jack Clubs King
## 262 Clubs Jack Clubs Nine
## 263 Clubs Jack Clubs Queen
## 264 Clubs Jack Clubs Seven
## 265 Clubs Jack Clubs Six
## 266 Clubs Jack Clubs Ten
## 267 Clubs Jack Clubs Three
## 268 Clubs Jack Diamonds Ace
## 269 Clubs Jack Diamonds Deuce
## 270 Clubs Jack Diamonds Eight
## 271 Clubs Jack Diamonds Five
## 272 Clubs Jack Diamonds Four
## 273 Clubs Jack Diamonds Jack
## 274 Clubs Jack Diamonds King
## 275 Clubs Jack Diamonds Nine
## 276 Clubs Jack Diamonds Queen
## 277 Clubs Jack Diamonds Seven
## 278 Clubs Jack Diamonds Six
## 279 Clubs Jack Diamonds Ten
## 280 Clubs Jack Diamonds Three
## 281 Clubs Jack Hearts Ace
## 282 Clubs Jack Hearts Deuce
## 283 Clubs Jack Hearts Eight
## 284 Clubs Jack Hearts Five
## 285 Clubs Jack Hearts Four
## 286 Clubs Jack Hearts Jack
## 287 Clubs Jack Hearts King
## 288 Clubs Jack Hearts Nine
## 289 Clubs Jack Hearts Queen
## 290 Clubs Jack Hearts Seven
## 291 Clubs Jack Hearts Six
## 292 Clubs Jack Hearts Ten
## 293 Clubs Jack Hearts Three
## 294 Clubs Jack Spades Ace
## 295 Clubs Jack Spades Deuce
## 296 Clubs Jack Spades Eight
## 297 Clubs Jack Spades Five
## 298 Clubs Jack Spades Four
## 299 Clubs Jack Spades Jack
## 300 Clubs Jack Spades King
## 301 Clubs Jack Spades Nine
## 302 Clubs Jack Spades Queen
## 303 Clubs Jack Spades Seven
## 304 Clubs Jack Spades Six
## 305 Clubs Jack Spades Ten
## 306 Clubs Jack Spades Three
## 307 Clubs King Clubs Ace
## 308 Clubs King Clubs Deuce
## 309 Clubs King Clubs Eight
## 310 Clubs King Clubs Five
## 311 Clubs King Clubs Four
## 312 Clubs King Clubs Jack
## 313 Clubs King Clubs Nine
## 314 Clubs King Clubs Queen
## 315 Clubs King Clubs Seven
## 316 Clubs King Clubs Six
## 317 Clubs King Clubs Ten
## 318 Clubs King Clubs Three
## 319 Clubs King Diamonds Ace
## 320 Clubs King Diamonds Deuce
## 321 Clubs King Diamonds Eight
## 322 Clubs King Diamonds Five
## 323 Clubs King Diamonds Four
## 324 Clubs King Diamonds Jack
## 325 Clubs King Diamonds King
## 326 Clubs King Diamonds Nine
## 327 Clubs King Diamonds Queen
## 328 Clubs King Diamonds Seven
## 329 Clubs King Diamonds Six
## 330 Clubs King Diamonds Ten
## 331 Clubs King Diamonds Three
## 332 Clubs King Hearts Ace
## 333 Clubs King Hearts Deuce
## 334 Clubs King Hearts Eight
## 335 Clubs King Hearts Five
## 336 Clubs King Hearts Four
## 337 Clubs King Hearts Jack
## 338 Clubs King Hearts King
## 339 Clubs King Hearts Nine
## 340 Clubs King Hearts Queen
## 341 Clubs King Hearts Seven
## 342 Clubs King Hearts Six
## 343 Clubs King Hearts Ten
## 344 Clubs King Hearts Three
## 345 Clubs King Spades Ace
## 346 Clubs King Spades Deuce
## 347 Clubs King Spades Eight
## 348 Clubs King Spades Five
## 349 Clubs King Spades Four
## 350 Clubs King Spades Jack
## 351 Clubs King Spades King
## 352 Clubs King Spades Nine
## 353 Clubs King Spades Queen
## 354 Clubs King Spades Seven
## 355 Clubs King Spades Six
## 356 Clubs King Spades Ten
## 357 Clubs King Spades Three
## 358 Clubs Nine Clubs Ace
## 359 Clubs Nine Clubs Deuce
## 360 Clubs Nine Clubs Eight
## 361 Clubs Nine Clubs Five
## 362 Clubs Nine Clubs Four
## 363 Clubs Nine Clubs Jack
## 364 Clubs Nine Clubs King
## 365 Clubs Nine Clubs Queen
## 366 Clubs Nine Clubs Seven
## 367 Clubs Nine Clubs Six
## 368 Clubs Nine Clubs Ten
## 369 Clubs Nine Clubs Three
## 370 Clubs Nine Diamonds Ace
## 371 Clubs Nine Diamonds Deuce
## 372 Clubs Nine Diamonds Eight
## 373 Clubs Nine Diamonds Five
## 374 Clubs Nine Diamonds Four
## 375 Clubs Nine Diamonds Jack
## 376 Clubs Nine Diamonds King
## 377 Clubs Nine Diamonds Nine
## 378 Clubs Nine Diamonds Queen
## 379 Clubs Nine Diamonds Seven
## 380 Clubs Nine Diamonds Six
## 381 Clubs Nine Diamonds Ten
## 382 Clubs Nine Diamonds Three
## 383 Clubs Nine Hearts Ace
## 384 Clubs Nine Hearts Deuce
## 385 Clubs Nine Hearts Eight
## 386 Clubs Nine Hearts Five
## 387 Clubs Nine Hearts Four
## 388 Clubs Nine Hearts Jack
## 389 Clubs Nine Hearts King
## 390 Clubs Nine Hearts Nine
## 391 Clubs Nine Hearts Queen
## 392 Clubs Nine Hearts Seven
## 393 Clubs Nine Hearts Six
## 394 Clubs Nine Hearts Ten
## 395 Clubs Nine Hearts Three
## 396 Clubs Nine Spades Ace
## 397 Clubs Nine Spades Deuce
## 398 Clubs Nine Spades Eight
## 399 Clubs Nine Spades Five
## 400 Clubs Nine Spades Four
## 401 Clubs Nine Spades Jack
## 402 Clubs Nine Spades King
## 403 Clubs Nine Spades Nine
## 404 Clubs Nine Spades Queen
## 405 Clubs Nine Spades Seven
## 406 Clubs Nine Spades Six
## 407 Clubs Nine Spades Ten
## 408 Clubs Nine Spades Three
## 409 Clubs Queen Clubs Ace
## 410 Clubs Queen Clubs Deuce
## 411 Clubs Queen Clubs Eight
## 412 Clubs Queen Clubs Five
## 413 Clubs Queen Clubs Four
## 414 Clubs Queen Clubs Jack
## 415 Clubs Queen Clubs King
## 416 Clubs Queen Clubs Nine
## 417 Clubs Queen Clubs Seven
## 418 Clubs Queen Clubs Six
## 419 Clubs Queen Clubs Ten
## 420 Clubs Queen Clubs Three
## 421 Clubs Queen Diamonds Ace
## 422 Clubs Queen Diamonds Deuce
## 423 Clubs Queen Diamonds Eight
## 424 Clubs Queen Diamonds Five
## 425 Clubs Queen Diamonds Four
## 426 Clubs Queen Diamonds Jack
## 427 Clubs Queen Diamonds King
## 428 Clubs Queen Diamonds Nine
## 429 Clubs Queen Diamonds Queen
## 430 Clubs Queen Diamonds Seven
## 431 Clubs Queen Diamonds Six
## 432 Clubs Queen Diamonds Ten
## 433 Clubs Queen Diamonds Three
## 434 Clubs Queen Hearts Ace
## 435 Clubs Queen Hearts Deuce
## 436 Clubs Queen Hearts Eight
## 437 Clubs Queen Hearts Five
## 438 Clubs Queen Hearts Four
## 439 Clubs Queen Hearts Jack
## 440 Clubs Queen Hearts King
## 441 Clubs Queen Hearts Nine
## 442 Clubs Queen Hearts Queen
## 443 Clubs Queen Hearts Seven
## 444 Clubs Queen Hearts Six
## 445 Clubs Queen Hearts Ten
## 446 Clubs Queen Hearts Three
## 447 Clubs Queen Spades Ace
## 448 Clubs Queen Spades Deuce
## 449 Clubs Queen Spades Eight
## 450 Clubs Queen Spades Five
## 451 Clubs Queen Spades Four
## 452 Clubs Queen Spades Jack
## 453 Clubs Queen Spades King
## 454 Clubs Queen Spades Nine
## 455 Clubs Queen Spades Queen
## 456 Clubs Queen Spades Seven
## 457 Clubs Queen Spades Six
## 458 Clubs Queen Spades Ten
## 459 Clubs Queen Spades Three
## 460 Clubs Seven Clubs Ace
## 461 Clubs Seven Clubs Deuce
## 462 Clubs Seven Clubs Eight
## 463 Clubs Seven Clubs Five
## 464 Clubs Seven Clubs Four
## 465 Clubs Seven Clubs Jack
## 466 Clubs Seven Clubs King
## 467 Clubs Seven Clubs Nine
## 468 Clubs Seven Clubs Queen
## 469 Clubs Seven Clubs Six
## 470 Clubs Seven Clubs Ten
## 471 Clubs Seven Clubs Three
## 472 Clubs Seven Diamonds Ace
## 473 Clubs Seven Diamonds Deuce
## 474 Clubs Seven Diamonds Eight
## 475 Clubs Seven Diamonds Five
## 476 Clubs Seven Diamonds Four
## 477 Clubs Seven Diamonds Jack
## 478 Clubs Seven Diamonds King
## 479 Clubs Seven Diamonds Nine
## 480 Clubs Seven Diamonds Queen
## 481 Clubs Seven Diamonds Seven
## 482 Clubs Seven Diamonds Six
## 483 Clubs Seven Diamonds Ten
## 484 Clubs Seven Diamonds Three
## 485 Clubs Seven Hearts Ace
## 486 Clubs Seven Hearts Deuce
## 487 Clubs Seven Hearts Eight
## 488 Clubs Seven Hearts Five
## 489 Clubs Seven Hearts Four
## 490 Clubs Seven Hearts Jack
## 491 Clubs Seven Hearts King
## 492 Clubs Seven Hearts Nine
## 493 Clubs Seven Hearts Queen
## 494 Clubs Seven Hearts Seven
## 495 Clubs Seven Hearts Six
## 496 Clubs Seven Hearts Ten
## 497 Clubs Seven Hearts Three
## 498 Clubs Seven Spades Ace
## 499 Clubs Seven Spades Deuce
## 500 Clubs Seven Spades Eight
## 501 Clubs Seven Spades Five
## 502 Clubs Seven Spades Four
## 503 Clubs Seven Spades Jack
## 504 Clubs Seven Spades King
## 505 Clubs Seven Spades Nine
## 506 Clubs Seven Spades Queen
## 507 Clubs Seven Spades Seven
## 508 Clubs Seven Spades Six
## 509 Clubs Seven Spades Ten
## 510 Clubs Seven Spades Three
## 511 Clubs Six Clubs Ace
## 512 Clubs Six Clubs Deuce
## 513 Clubs Six Clubs Eight
## 514 Clubs Six Clubs Five
## 515 Clubs Six Clubs Four
## 516 Clubs Six Clubs Jack
## 517 Clubs Six Clubs King
## 518 Clubs Six Clubs Nine
## 519 Clubs Six Clubs Queen
## 520 Clubs Six Clubs Seven
## 521 Clubs Six Clubs Ten
## 522 Clubs Six Clubs Three
## 523 Clubs Six Diamonds Ace
## 524 Clubs Six Diamonds Deuce
## 525 Clubs Six Diamonds Eight
## 526 Clubs Six Diamonds Five
## 527 Clubs Six Diamonds Four
## 528 Clubs Six Diamonds Jack
## 529 Clubs Six Diamonds King
## 530 Clubs Six Diamonds Nine
## 531 Clubs Six Diamonds Queen
## 532 Clubs Six Diamonds Seven
## 533 Clubs Six Diamonds Six
## 534 Clubs Six Diamonds Ten
## 535 Clubs Six Diamonds Three
## 536 Clubs Six Hearts Ace
## 537 Clubs Six Hearts Deuce
## 538 Clubs Six Hearts Eight
## 539 Clubs Six Hearts Five
## 540 Clubs Six Hearts Four
## 541 Clubs Six Hearts Jack
## 542 Clubs Six Hearts King
## 543 Clubs Six Hearts Nine
## 544 Clubs Six Hearts Queen
## 545 Clubs Six Hearts Seven
## 546 Clubs Six Hearts Six
## 547 Clubs Six Hearts Ten
## 548 Clubs Six Hearts Three
## 549 Clubs Six Spades Ace
## 550 Clubs Six Spades Deuce
## 551 Clubs Six Spades Eight
## 552 Clubs Six Spades Five
## 553 Clubs Six Spades Four
## 554 Clubs Six Spades Jack
## 555 Clubs Six Spades King
## 556 Clubs Six Spades Nine
## 557 Clubs Six Spades Queen
## 558 Clubs Six Spades Seven
## 559 Clubs Six Spades Six
## 560 Clubs Six Spades Ten
## 561 Clubs Six Spades Three
## 562 Clubs Ten Clubs Ace
## 563 Clubs Ten Clubs Deuce
## 564 Clubs Ten Clubs Eight
## 565 Clubs Ten Clubs Five
## 566 Clubs Ten Clubs Four
## 567 Clubs Ten Clubs Jack
## 568 Clubs Ten Clubs King
## 569 Clubs Ten Clubs Nine
## 570 Clubs Ten Clubs Queen
## 571 Clubs Ten Clubs Seven
## 572 Clubs Ten Clubs Six
## 573 Clubs Ten Clubs Three
## 574 Clubs Ten Diamonds Ace
## 575 Clubs Ten Diamonds Deuce
## 576 Clubs Ten Diamonds Eight
## 577 Clubs Ten Diamonds Five
## 578 Clubs Ten Diamonds Four
## 579 Clubs Ten Diamonds Jack
## 580 Clubs Ten Diamonds King
## 581 Clubs Ten Diamonds Nine
## 582 Clubs Ten Diamonds Queen
## 583 Clubs Ten Diamonds Seven
## 584 Clubs Ten Diamonds Six
## 585 Clubs Ten Diamonds Ten
## 586 Clubs Ten Diamonds Three
## 587 Clubs Ten Hearts Ace
## 588 Clubs Ten Hearts Deuce
## 589 Clubs Ten Hearts Eight
## 590 Clubs Ten Hearts Five
## 591 Clubs Ten Hearts Four
## 592 Clubs Ten Hearts Jack
## 593 Clubs Ten Hearts King
## 594 Clubs Ten Hearts Nine
## 595 Clubs Ten Hearts Queen
## 596 Clubs Ten Hearts Seven
## 597 Clubs Ten Hearts Six
## 598 Clubs Ten Hearts Ten
## 599 Clubs Ten Hearts Three
## 600 Clubs Ten Spades Ace
## 601 Clubs Ten Spades Deuce
## 602 Clubs Ten Spades Eight
## 603 Clubs Ten Spades Five
## 604 Clubs Ten Spades Four
## 605 Clubs Ten Spades Jack
## 606 Clubs Ten Spades King
## 607 Clubs Ten Spades Nine
## 608 Clubs Ten Spades Queen
## 609 Clubs Ten Spades Seven
## 610 Clubs Ten Spades Six
## 611 Clubs Ten Spades Ten
## 612 Clubs Ten Spades Three
## 613 Clubs Three Clubs Ace
## 614 Clubs Three Clubs Deuce
## 615 Clubs Three Clubs Eight
## 616 Clubs Three Clubs Five
## 617 Clubs Three Clubs Four
## 618 Clubs Three Clubs Jack
## 619 Clubs Three Clubs King
## 620 Clubs Three Clubs Nine
## 621 Clubs Three Clubs Queen
## 622 Clubs Three Clubs Seven
## 623 Clubs Three Clubs Six
## 624 Clubs Three Clubs Ten
## 625 Clubs Three Diamonds Ace
## 626 Clubs Three Diamonds Deuce
## 627 Clubs Three Diamonds Eight
## 628 Clubs Three Diamonds Five
## 629 Clubs Three Diamonds Four
## 630 Clubs Three Diamonds Jack
## 631 Clubs Three Diamonds King
## 632 Clubs Three Diamonds Nine
## 633 Clubs Three Diamonds Queen
## 634 Clubs Three Diamonds Seven
## 635 Clubs Three Diamonds Six
## 636 Clubs Three Diamonds Ten
## 637 Clubs Three Diamonds Three
## 638 Clubs Three Hearts Ace
## 639 Clubs Three Hearts Deuce
## 640 Clubs Three Hearts Eight
## 641 Clubs Three Hearts Five
## 642 Clubs Three Hearts Four
## 643 Clubs Three Hearts Jack
## 644 Clubs Three Hearts King
## 645 Clubs Three Hearts Nine
## 646 Clubs Three Hearts Queen
## 647 Clubs Three Hearts Seven
## 648 Clubs Three Hearts Six
## 649 Clubs Three Hearts Ten
## 650 Clubs Three Hearts Three
## 651 Clubs Three Spades Ace
## 652 Clubs Three Spades Deuce
## 653 Clubs Three Spades Eight
## 654 Clubs Three Spades Five
## 655 Clubs Three Spades Four
## 656 Clubs Three Spades Jack
## 657 Clubs Three Spades King
## 658 Clubs Three Spades Nine
## 659 Clubs Three Spades Queen
## 660 Clubs Three Spades Seven
## 661 Clubs Three Spades Six
## 662 Clubs Three Spades Ten
## 663 Clubs Three Spades Three
## 664 Diamonds Ace Clubs Ace
## 665 Diamonds Ace Clubs Deuce
## 666 Diamonds Ace Clubs Eight
## 667 Diamonds Ace Clubs Five
## 668 Diamonds Ace Clubs Four
## 669 Diamonds Ace Clubs Jack
## 670 Diamonds Ace Clubs King
## 671 Diamonds Ace Clubs Nine
## 672 Diamonds Ace Clubs Queen
## 673 Diamonds Ace Clubs Seven
## 674 Diamonds Ace Clubs Six
## 675 Diamonds Ace Clubs Ten
## 676 Diamonds Ace Clubs Three
## 677 Diamonds Ace Diamonds Deuce
## 678 Diamonds Ace Diamonds Eight
## 679 Diamonds Ace Diamonds Five
## 680 Diamonds Ace Diamonds Four
## 681 Diamonds Ace Diamonds Jack
## 682 Diamonds Ace Diamonds King
## 683 Diamonds Ace Diamonds Nine
## 684 Diamonds Ace Diamonds Queen
## 685 Diamonds Ace Diamonds Seven
## 686 Diamonds Ace Diamonds Six
## 687 Diamonds Ace Diamonds Ten
## 688 Diamonds Ace Diamonds Three
## 689 Diamonds Ace Hearts Ace
## 690 Diamonds Ace Hearts Deuce
## 691 Diamonds Ace Hearts Eight
## 692 Diamonds Ace Hearts Five
## 693 Diamonds Ace Hearts Four
## 694 Diamonds Ace Hearts Jack
## 695 Diamonds Ace Hearts King
## 696 Diamonds Ace Hearts Nine
## 697 Diamonds Ace Hearts Queen
## 698 Diamonds Ace Hearts Seven
## 699 Diamonds Ace Hearts Six
## 700 Diamonds Ace Hearts Ten
## 701 Diamonds Ace Hearts Three
## 702 Diamonds Ace Spades Ace
## 703 Diamonds Ace Spades Deuce
## 704 Diamonds Ace Spades Eight
## 705 Diamonds Ace Spades Five
## 706 Diamonds Ace Spades Four
## 707 Diamonds Ace Spades Jack
## 708 Diamonds Ace Spades King
## 709 Diamonds Ace Spades Nine
## 710 Diamonds Ace Spades Queen
## 711 Diamonds Ace Spades Seven
## 712 Diamonds Ace Spades Six
## 713 Diamonds Ace Spades Ten
## 714 Diamonds Ace Spades Three
## 715 Diamonds Deuce Clubs Ace
## 716 Diamonds Deuce Clubs Deuce
## 717 Diamonds Deuce Clubs Eight
## 718 Diamonds Deuce Clubs Five
## 719 Diamonds Deuce Clubs Four
## 720 Diamonds Deuce Clubs Jack
## 721 Diamonds Deuce Clubs King
## 722 Diamonds Deuce Clubs Nine
## 723 Diamonds Deuce Clubs Queen
## 724 Diamonds Deuce Clubs Seven
## 725 Diamonds Deuce Clubs Six
## 726 Diamonds Deuce Clubs Ten
## 727 Diamonds Deuce Clubs Three
## 728 Diamonds Deuce Diamonds Ace
## 729 Diamonds Deuce Diamonds Eight
## 730 Diamonds Deuce Diamonds Five
## 731 Diamonds Deuce Diamonds Four
## 732 Diamonds Deuce Diamonds Jack
## 733 Diamonds Deuce Diamonds King
## 734 Diamonds Deuce Diamonds Nine
## 735 Diamonds Deuce Diamonds Queen
## 736 Diamonds Deuce Diamonds Seven
## 737 Diamonds Deuce Diamonds Six
## 738 Diamonds Deuce Diamonds Ten
## 739 Diamonds Deuce Diamonds Three
## 740 Diamonds Deuce Hearts Ace
## 741 Diamonds Deuce Hearts Deuce
## 742 Diamonds Deuce Hearts Eight
## 743 Diamonds Deuce Hearts Five
## 744 Diamonds Deuce Hearts Four
## 745 Diamonds Deuce Hearts Jack
## 746 Diamonds Deuce Hearts King
## 747 Diamonds Deuce Hearts Nine
## 748 Diamonds Deuce Hearts Queen
## 749 Diamonds Deuce Hearts Seven
## 750 Diamonds Deuce Hearts Six
## 751 Diamonds Deuce Hearts Ten
## 752 Diamonds Deuce Hearts Three
## 753 Diamonds Deuce Spades Ace
## 754 Diamonds Deuce Spades Deuce
## 755 Diamonds Deuce Spades Eight
## 756 Diamonds Deuce Spades Five
## 757 Diamonds Deuce Spades Four
## 758 Diamonds Deuce Spades Jack
## 759 Diamonds Deuce Spades King
## 760 Diamonds Deuce Spades Nine
## 761 Diamonds Deuce Spades Queen
## 762 Diamonds Deuce Spades Seven
## 763 Diamonds Deuce Spades Six
## 764 Diamonds Deuce Spades Ten
## 765 Diamonds Deuce Spades Three
## 766 Diamonds Eight Clubs Ace
## 767 Diamonds Eight Clubs Deuce
## 768 Diamonds Eight Clubs Eight
## 769 Diamonds Eight Clubs Five
## 770 Diamonds Eight Clubs Four
## 771 Diamonds Eight Clubs Jack
## 772 Diamonds Eight Clubs King
## 773 Diamonds Eight Clubs Nine
## 774 Diamonds Eight Clubs Queen
## 775 Diamonds Eight Clubs Seven
## 776 Diamonds Eight Clubs Six
## 777 Diamonds Eight Clubs Ten
## 778 Diamonds Eight Clubs Three
## 779 Diamonds Eight Diamonds Ace
## 780 Diamonds Eight Diamonds Deuce
## 781 Diamonds Eight Diamonds Five
## 782 Diamonds Eight Diamonds Four
## 783 Diamonds Eight Diamonds Jack
## 784 Diamonds Eight Diamonds King
## 785 Diamonds Eight Diamonds Nine
## 786 Diamonds Eight Diamonds Queen
## 787 Diamonds Eight Diamonds Seven
## 788 Diamonds Eight Diamonds Six
## 789 Diamonds Eight Diamonds Ten
## 790 Diamonds Eight Diamonds Three
## 791 Diamonds Eight Hearts Ace
## 792 Diamonds Eight Hearts Deuce
## 793 Diamonds Eight Hearts Eight
## 794 Diamonds Eight Hearts Five
## 795 Diamonds Eight Hearts Four
## 796 Diamonds Eight Hearts Jack
## 797 Diamonds Eight Hearts King
## 798 Diamonds Eight Hearts Nine
## 799 Diamonds Eight Hearts Queen
## 800 Diamonds Eight Hearts Seven
## 801 Diamonds Eight Hearts Six
## 802 Diamonds Eight Hearts Ten
## 803 Diamonds Eight Hearts Three
## 804 Diamonds Eight Spades Ace
## 805 Diamonds Eight Spades Deuce
## 806 Diamonds Eight Spades Eight
## 807 Diamonds Eight Spades Five
## 808 Diamonds Eight Spades Four
## 809 Diamonds Eight Spades Jack
## 810 Diamonds Eight Spades King
## 811 Diamonds Eight Spades Nine
## 812 Diamonds Eight Spades Queen
## 813 Diamonds Eight Spades Seven
## 814 Diamonds Eight Spades Six
## 815 Diamonds Eight Spades Ten
## 816 Diamonds Eight Spades Three
## 817 Diamonds Five Clubs Ace
## 818 Diamonds Five Clubs Deuce
## 819 Diamonds Five Clubs Eight
## 820 Diamonds Five Clubs Five
## 821 Diamonds Five Clubs Four
## 822 Diamonds Five Clubs Jack
## 823 Diamonds Five Clubs King
## 824 Diamonds Five Clubs Nine
## 825 Diamonds Five Clubs Queen
## 826 Diamonds Five Clubs Seven
## 827 Diamonds Five Clubs Six
## 828 Diamonds Five Clubs Ten
## 829 Diamonds Five Clubs Three
## 830 Diamonds Five Diamonds Ace
## 831 Diamonds Five Diamonds Deuce
## 832 Diamonds Five Diamonds Eight
## 833 Diamonds Five Diamonds Four
## 834 Diamonds Five Diamonds Jack
## 835 Diamonds Five Diamonds King
## 836 Diamonds Five Diamonds Nine
## 837 Diamonds Five Diamonds Queen
## 838 Diamonds Five Diamonds Seven
## 839 Diamonds Five Diamonds Six
## 840 Diamonds Five Diamonds Ten
## 841 Diamonds Five Diamonds Three
## 842 Diamonds Five Hearts Ace
## 843 Diamonds Five Hearts Deuce
## 844 Diamonds Five Hearts Eight
## 845 Diamonds Five Hearts Five
## 846 Diamonds Five Hearts Four
## 847 Diamonds Five Hearts Jack
## 848 Diamonds Five Hearts King
## 849 Diamonds Five Hearts Nine
## 850 Diamonds Five Hearts Queen
## 851 Diamonds Five Hearts Seven
## 852 Diamonds Five Hearts Six
## 853 Diamonds Five Hearts Ten
## 854 Diamonds Five Hearts Three
## 855 Diamonds Five Spades Ace
## 856 Diamonds Five Spades Deuce
## 857 Diamonds Five Spades Eight
## 858 Diamonds Five Spades Five
## 859 Diamonds Five Spades Four
## 860 Diamonds Five Spades Jack
## 861 Diamonds Five Spades King
## 862 Diamonds Five Spades Nine
## 863 Diamonds Five Spades Queen
## 864 Diamonds Five Spades Seven
## 865 Diamonds Five Spades Six
## 866 Diamonds Five Spades Ten
## 867 Diamonds Five Spades Three
## 868 Diamonds Four Clubs Ace
## 869 Diamonds Four Clubs Deuce
## 870 Diamonds Four Clubs Eight
## 871 Diamonds Four Clubs Five
## 872 Diamonds Four Clubs Four
## 873 Diamonds Four Clubs Jack
## 874 Diamonds Four Clubs King
## 875 Diamonds Four Clubs Nine
## 876 Diamonds Four Clubs Queen
## 877 Diamonds Four Clubs Seven
## 878 Diamonds Four Clubs Six
## 879 Diamonds Four Clubs Ten
## 880 Diamonds Four Clubs Three
## 881 Diamonds Four Diamonds Ace
## 882 Diamonds Four Diamonds Deuce
## 883 Diamonds Four Diamonds Eight
## 884 Diamonds Four Diamonds Five
## 885 Diamonds Four Diamonds Jack
## 886 Diamonds Four Diamonds King
## 887 Diamonds Four Diamonds Nine
## 888 Diamonds Four Diamonds Queen
## 889 Diamonds Four Diamonds Seven
## 890 Diamonds Four Diamonds Six
## 891 Diamonds Four Diamonds Ten
## 892 Diamonds Four Diamonds Three
## 893 Diamonds Four Hearts Ace
## 894 Diamonds Four Hearts Deuce
## 895 Diamonds Four Hearts Eight
## 896 Diamonds Four Hearts Five
## 897 Diamonds Four Hearts Four
## 898 Diamonds Four Hearts Jack
## 899 Diamonds Four Hearts King
## 900 Diamonds Four Hearts Nine
## 901 Diamonds Four Hearts Queen
## 902 Diamonds Four Hearts Seven
## 903 Diamonds Four Hearts Six
## 904 Diamonds Four Hearts Ten
## 905 Diamonds Four Hearts Three
## 906 Diamonds Four Spades Ace
## 907 Diamonds Four Spades Deuce
## 908 Diamonds Four Spades Eight
## 909 Diamonds Four Spades Five
## 910 Diamonds Four Spades Four
## 911 Diamonds Four Spades Jack
## 912 Diamonds Four Spades King
## 913 Diamonds Four Spades Nine
## 914 Diamonds Four Spades Queen
## 915 Diamonds Four Spades Seven
## 916 Diamonds Four Spades Six
## 917 Diamonds Four Spades Ten
## 918 Diamonds Four Spades Three
## 919 Diamonds Jack Clubs Ace
## 920 Diamonds Jack Clubs Deuce
## 921 Diamonds Jack Clubs Eight
## 922 Diamonds Jack Clubs Five
## 923 Diamonds Jack Clubs Four
## 924 Diamonds Jack Clubs Jack
## 925 Diamonds Jack Clubs King
## 926 Diamonds Jack Clubs Nine
## 927 Diamonds Jack Clubs Queen
## 928 Diamonds Jack Clubs Seven
## 929 Diamonds Jack Clubs Six
## 930 Diamonds Jack Clubs Ten
## 931 Diamonds Jack Clubs Three
## 932 Diamonds Jack Diamonds Ace
## 933 Diamonds Jack Diamonds Deuce
## 934 Diamonds Jack Diamonds Eight
## 935 Diamonds Jack Diamonds Five
## 936 Diamonds Jack Diamonds Four
## 937 Diamonds Jack Diamonds King
## 938 Diamonds Jack Diamonds Nine
## 939 Diamonds Jack Diamonds Queen
## 940 Diamonds Jack Diamonds Seven
## 941 Diamonds Jack Diamonds Six
## 942 Diamonds Jack Diamonds Ten
## 943 Diamonds Jack Diamonds Three
## 944 Diamonds Jack Hearts Ace
## 945 Diamonds Jack Hearts Deuce
## 946 Diamonds Jack Hearts Eight
## 947 Diamonds Jack Hearts Five
## 948 Diamonds Jack Hearts Four
## 949 Diamonds Jack Hearts Jack
## 950 Diamonds Jack Hearts King
## 951 Diamonds Jack Hearts Nine
## 952 Diamonds Jack Hearts Queen
## 953 Diamonds Jack Hearts Seven
## 954 Diamonds Jack Hearts Six
## 955 Diamonds Jack Hearts Ten
## 956 Diamonds Jack Hearts Three
## 957 Diamonds Jack Spades Ace
## 958 Diamonds Jack Spades Deuce
## 959 Diamonds Jack Spades Eight
## 960 Diamonds Jack Spades Five
## 961 Diamonds Jack Spades Four
## 962 Diamonds Jack Spades Jack
## 963 Diamonds Jack Spades King
## 964 Diamonds Jack Spades Nine
## 965 Diamonds Jack Spades Queen
## 966 Diamonds Jack Spades Seven
## 967 Diamonds Jack Spades Six
## 968 Diamonds Jack Spades Ten
## 969 Diamonds Jack Spades Three
## 970 Diamonds King Clubs Ace
## 971 Diamonds King Clubs Deuce
## 972 Diamonds King Clubs Eight
## 973 Diamonds King Clubs Five
## 974 Diamonds King Clubs Four
## 975 Diamonds King Clubs Jack
## 976 Diamonds King Clubs King
## 977 Diamonds King Clubs Nine
## 978 Diamonds King Clubs Queen
## 979 Diamonds King Clubs Seven
## 980 Diamonds King Clubs Six
## 981 Diamonds King Clubs Ten
## 982 Diamonds King Clubs Three
## 983 Diamonds King Diamonds Ace
## 984 Diamonds King Diamonds Deuce
## 985 Diamonds King Diamonds Eight
## 986 Diamonds King Diamonds Five
## 987 Diamonds King Diamonds Four
## 988 Diamonds King Diamonds Jack
## 989 Diamonds King Diamonds Nine
## 990 Diamonds King Diamonds Queen
## 991 Diamonds King Diamonds Seven
## 992 Diamonds King Diamonds Six
## 993 Diamonds King Diamonds Ten
## 994 Diamonds King Diamonds Three
## 995 Diamonds King Hearts Ace
## 996 Diamonds King Hearts Deuce
## 997 Diamonds King Hearts Eight
## 998 Diamonds King Hearts Five
## 999 Diamonds King Hearts Four
## 1000 Diamonds King Hearts Jack
## 1001 Diamonds King Hearts King
## 1002 Diamonds King Hearts Nine
## 1003 Diamonds King Hearts Queen
## 1004 Diamonds King Hearts Seven
## 1005 Diamonds King Hearts Six
## 1006 Diamonds King Hearts Ten
## 1007 Diamonds King Hearts Three
## 1008 Diamonds King Spades Ace
## 1009 Diamonds King Spades Deuce
## 1010 Diamonds King Spades Eight
## 1011 Diamonds King Spades Five
## 1012 Diamonds King Spades Four
## 1013 Diamonds King Spades Jack
## 1014 Diamonds King Spades King
## 1015 Diamonds King Spades Nine
## 1016 Diamonds King Spades Queen
## 1017 Diamonds King Spades Seven
## 1018 Diamonds King Spades Six
## 1019 Diamonds King Spades Ten
## 1020 Diamonds King Spades Three
## 1021 Diamonds Nine Clubs Ace
## 1022 Diamonds Nine Clubs Deuce
## 1023 Diamonds Nine Clubs Eight
## 1024 Diamonds Nine Clubs Five
## 1025 Diamonds Nine Clubs Four
## 1026 Diamonds Nine Clubs Jack
## 1027 Diamonds Nine Clubs King
## 1028 Diamonds Nine Clubs Nine
## 1029 Diamonds Nine Clubs Queen
## 1030 Diamonds Nine Clubs Seven
## 1031 Diamonds Nine Clubs Six
## 1032 Diamonds Nine Clubs Ten
## 1033 Diamonds Nine Clubs Three
## 1034 Diamonds Nine Diamonds Ace
## 1035 Diamonds Nine Diamonds Deuce
## 1036 Diamonds Nine Diamonds Eight
## 1037 Diamonds Nine Diamonds Five
## 1038 Diamonds Nine Diamonds Four
## 1039 Diamonds Nine Diamonds Jack
## 1040 Diamonds Nine Diamonds King
## 1041 Diamonds Nine Diamonds Queen
## 1042 Diamonds Nine Diamonds Seven
## 1043 Diamonds Nine Diamonds Six
## 1044 Diamonds Nine Diamonds Ten
## 1045 Diamonds Nine Diamonds Three
## 1046 Diamonds Nine Hearts Ace
## 1047 Diamonds Nine Hearts Deuce
## 1048 Diamonds Nine Hearts Eight
## 1049 Diamonds Nine Hearts Five
## 1050 Diamonds Nine Hearts Four
## 1051 Diamonds Nine Hearts Jack
## 1052 Diamonds Nine Hearts King
## 1053 Diamonds Nine Hearts Nine
## 1054 Diamonds Nine Hearts Queen
## 1055 Diamonds Nine Hearts Seven
## 1056 Diamonds Nine Hearts Six
## 1057 Diamonds Nine Hearts Ten
## 1058 Diamonds Nine Hearts Three
## 1059 Diamonds Nine Spades Ace
## 1060 Diamonds Nine Spades Deuce
## 1061 Diamonds Nine Spades Eight
## 1062 Diamonds Nine Spades Five
## 1063 Diamonds Nine Spades Four
## 1064 Diamonds Nine Spades Jack
## 1065 Diamonds Nine Spades King
## 1066 Diamonds Nine Spades Nine
## 1067 Diamonds Nine Spades Queen
## 1068 Diamonds Nine Spades Seven
## 1069 Diamonds Nine Spades Six
## 1070 Diamonds Nine Spades Ten
## 1071 Diamonds Nine Spades Three
## 1072 Diamonds Queen Clubs Ace
## 1073 Diamonds Queen Clubs Deuce
## 1074 Diamonds Queen Clubs Eight
## 1075 Diamonds Queen Clubs Five
## 1076 Diamonds Queen Clubs Four
## 1077 Diamonds Queen Clubs Jack
## 1078 Diamonds Queen Clubs King
## 1079 Diamonds Queen Clubs Nine
## 1080 Diamonds Queen Clubs Queen
## 1081 Diamonds Queen Clubs Seven
## 1082 Diamonds Queen Clubs Six
## 1083 Diamonds Queen Clubs Ten
## 1084 Diamonds Queen Clubs Three
## 1085 Diamonds Queen Diamonds Ace
## 1086 Diamonds Queen Diamonds Deuce
## 1087 Diamonds Queen Diamonds Eight
## 1088 Diamonds Queen Diamonds Five
## 1089 Diamonds Queen Diamonds Four
## 1090 Diamonds Queen Diamonds Jack
## 1091 Diamonds Queen Diamonds King
## 1092 Diamonds Queen Diamonds Nine
## 1093 Diamonds Queen Diamonds Seven
## 1094 Diamonds Queen Diamonds Six
## 1095 Diamonds Queen Diamonds Ten
## 1096 Diamonds Queen Diamonds Three
## 1097 Diamonds Queen Hearts Ace
## 1098 Diamonds Queen Hearts Deuce
## 1099 Diamonds Queen Hearts Eight
## 1100 Diamonds Queen Hearts Five
## 1101 Diamonds Queen Hearts Four
## 1102 Diamonds Queen Hearts Jack
## 1103 Diamonds Queen Hearts King
## 1104 Diamonds Queen Hearts Nine
## 1105 Diamonds Queen Hearts Queen
## 1106 Diamonds Queen Hearts Seven
## 1107 Diamonds Queen Hearts Six
## 1108 Diamonds Queen Hearts Ten
## 1109 Diamonds Queen Hearts Three
## 1110 Diamonds Queen Spades Ace
## 1111 Diamonds Queen Spades Deuce
## 1112 Diamonds Queen Spades Eight
## 1113 Diamonds Queen Spades Five
## 1114 Diamonds Queen Spades Four
## 1115 Diamonds Queen Spades Jack
## 1116 Diamonds Queen Spades King
## 1117 Diamonds Queen Spades Nine
## 1118 Diamonds Queen Spades Queen
## 1119 Diamonds Queen Spades Seven
## 1120 Diamonds Queen Spades Six
## 1121 Diamonds Queen Spades Ten
## 1122 Diamonds Queen Spades Three
## 1123 Diamonds Seven Clubs Ace
## 1124 Diamonds Seven Clubs Deuce
## 1125 Diamonds Seven Clubs Eight
## 1126 Diamonds Seven Clubs Five
## 1127 Diamonds Seven Clubs Four
## 1128 Diamonds Seven Clubs Jack
## 1129 Diamonds Seven Clubs King
## 1130 Diamonds Seven Clubs Nine
## 1131 Diamonds Seven Clubs Queen
## 1132 Diamonds Seven Clubs Seven
## 1133 Diamonds Seven Clubs Six
## 1134 Diamonds Seven Clubs Ten
## 1135 Diamonds Seven Clubs Three
## 1136 Diamonds Seven Diamonds Ace
## 1137 Diamonds Seven Diamonds Deuce
## 1138 Diamonds Seven Diamonds Eight
## 1139 Diamonds Seven Diamonds Five
## 1140 Diamonds Seven Diamonds Four
## 1141 Diamonds Seven Diamonds Jack
## 1142 Diamonds Seven Diamonds King
## 1143 Diamonds Seven Diamonds Nine
## 1144 Diamonds Seven Diamonds Queen
## 1145 Diamonds Seven Diamonds Six
## 1146 Diamonds Seven Diamonds Ten
## 1147 Diamonds Seven Diamonds Three
## 1148 Diamonds Seven Hearts Ace
## 1149 Diamonds Seven Hearts Deuce
## 1150 Diamonds Seven Hearts Eight
## 1151 Diamonds Seven Hearts Five
## 1152 Diamonds Seven Hearts Four
## 1153 Diamonds Seven Hearts Jack
## 1154 Diamonds Seven Hearts King
## 1155 Diamonds Seven Hearts Nine
## 1156 Diamonds Seven Hearts Queen
## 1157 Diamonds Seven Hearts Seven
## 1158 Diamonds Seven Hearts Six
## 1159 Diamonds Seven Hearts Ten
## 1160 Diamonds Seven Hearts Three
## 1161 Diamonds Seven Spades Ace
## 1162 Diamonds Seven Spades Deuce
## 1163 Diamonds Seven Spades Eight
## 1164 Diamonds Seven Spades Five
## 1165 Diamonds Seven Spades Four
## 1166 Diamonds Seven Spades Jack
## 1167 Diamonds Seven Spades King
## 1168 Diamonds Seven Spades Nine
## 1169 Diamonds Seven Spades Queen
## 1170 Diamonds Seven Spades Seven
## 1171 Diamonds Seven Spades Six
## 1172 Diamonds Seven Spades Ten
## 1173 Diamonds Seven Spades Three
## 1174 Diamonds Six Clubs Ace
## 1175 Diamonds Six Clubs Deuce
## 1176 Diamonds Six Clubs Eight
## 1177 Diamonds Six Clubs Five
## 1178 Diamonds Six Clubs Four
## 1179 Diamonds Six Clubs Jack
## 1180 Diamonds Six Clubs King
## 1181 Diamonds Six Clubs Nine
## 1182 Diamonds Six Clubs Queen
## 1183 Diamonds Six Clubs Seven
## 1184 Diamonds Six Clubs Six
## 1185 Diamonds Six Clubs Ten
## 1186 Diamonds Six Clubs Three
## 1187 Diamonds Six Diamonds Ace
## 1188 Diamonds Six Diamonds Deuce
## 1189 Diamonds Six Diamonds Eight
## 1190 Diamonds Six Diamonds Five
## 1191 Diamonds Six Diamonds Four
## 1192 Diamonds Six Diamonds Jack
## 1193 Diamonds Six Diamonds King
## 1194 Diamonds Six Diamonds Nine
## 1195 Diamonds Six Diamonds Queen
## 1196 Diamonds Six Diamonds Seven
## 1197 Diamonds Six Diamonds Ten
## 1198 Diamonds Six Diamonds Three
## 1199 Diamonds Six Hearts Ace
## 1200 Diamonds Six Hearts Deuce
## 1201 Diamonds Six Hearts Eight
## 1202 Diamonds Six Hearts Five
## 1203 Diamonds Six Hearts Four
## 1204 Diamonds Six Hearts Jack
## 1205 Diamonds Six Hearts King
## 1206 Diamonds Six Hearts Nine
## 1207 Diamonds Six Hearts Queen
## 1208 Diamonds Six Hearts Seven
## 1209 Diamonds Six Hearts Six
## 1210 Diamonds Six Hearts Ten
## 1211 Diamonds Six Hearts Three
## 1212 Diamonds Six Spades Ace
## 1213 Diamonds Six Spades Deuce
## 1214 Diamonds Six Spades Eight
## 1215 Diamonds Six Spades Five
## 1216 Diamonds Six Spades Four
## 1217 Diamonds Six Spades Jack
## 1218 Diamonds Six Spades King
## 1219 Diamonds Six Spades Nine
## 1220 Diamonds Six Spades Queen
## 1221 Diamonds Six Spades Seven
## 1222 Diamonds Six Spades Six
## 1223 Diamonds Six Spades Ten
## 1224 Diamonds Six Spades Three
## 1225 Diamonds Ten Clubs Ace
## 1226 Diamonds Ten Clubs Deuce
## 1227 Diamonds Ten Clubs Eight
## 1228 Diamonds Ten Clubs Five
## 1229 Diamonds Ten Clubs Four
## 1230 Diamonds Ten Clubs Jack
## 1231 Diamonds Ten Clubs King
## 1232 Diamonds Ten Clubs Nine
## 1233 Diamonds Ten Clubs Queen
## 1234 Diamonds Ten Clubs Seven
## 1235 Diamonds Ten Clubs Six
## 1236 Diamonds Ten Clubs Ten
## 1237 Diamonds Ten Clubs Three
## 1238 Diamonds Ten Diamonds Ace
## 1239 Diamonds Ten Diamonds Deuce
## 1240 Diamonds Ten Diamonds Eight
## 1241 Diamonds Ten Diamonds Five
## 1242 Diamonds Ten Diamonds Four
## 1243 Diamonds Ten Diamonds Jack
## 1244 Diamonds Ten Diamonds King
## 1245 Diamonds Ten Diamonds Nine
## 1246 Diamonds Ten Diamonds Queen
## 1247 Diamonds Ten Diamonds Seven
## 1248 Diamonds Ten Diamonds Six
## 1249 Diamonds Ten Diamonds Three
## 1250 Diamonds Ten Hearts Ace
## 1251 Diamonds Ten Hearts Deuce
## 1252 Diamonds Ten Hearts Eight
## 1253 Diamonds Ten Hearts Five
## 1254 Diamonds Ten Hearts Four
## 1255 Diamonds Ten Hearts Jack
## 1256 Diamonds Ten Hearts King
## 1257 Diamonds Ten Hearts Nine
## 1258 Diamonds Ten Hearts Queen
## 1259 Diamonds Ten Hearts Seven
## 1260 Diamonds Ten Hearts Six
## 1261 Diamonds Ten Hearts Ten
## 1262 Diamonds Ten Hearts Three
## 1263 Diamonds Ten Spades Ace
## 1264 Diamonds Ten Spades Deuce
## 1265 Diamonds Ten Spades Eight
## 1266 Diamonds Ten Spades Five
## 1267 Diamonds Ten Spades Four
## 1268 Diamonds Ten Spades Jack
## 1269 Diamonds Ten Spades King
## 1270 Diamonds Ten Spades Nine
## 1271 Diamonds Ten Spades Queen
## 1272 Diamonds Ten Spades Seven
## 1273 Diamonds Ten Spades Six
## 1274 Diamonds Ten Spades Ten
## 1275 Diamonds Ten Spades Three
## 1276 Diamonds Three Clubs Ace
## 1277 Diamonds Three Clubs Deuce
## 1278 Diamonds Three Clubs Eight
## 1279 Diamonds Three Clubs Five
## 1280 Diamonds Three Clubs Four
## 1281 Diamonds Three Clubs Jack
## 1282 Diamonds Three Clubs King
## 1283 Diamonds Three Clubs Nine
## 1284 Diamonds Three Clubs Queen
## 1285 Diamonds Three Clubs Seven
## 1286 Diamonds Three Clubs Six
## 1287 Diamonds Three Clubs Ten
## 1288 Diamonds Three Clubs Three
## 1289 Diamonds Three Diamonds Ace
## 1290 Diamonds Three Diamonds Deuce
## 1291 Diamonds Three Diamonds Eight
## 1292 Diamonds Three Diamonds Five
## 1293 Diamonds Three Diamonds Four
## 1294 Diamonds Three Diamonds Jack
## 1295 Diamonds Three Diamonds King
## 1296 Diamonds Three Diamonds Nine
## 1297 Diamonds Three Diamonds Queen
## 1298 Diamonds Three Diamonds Seven
## 1299 Diamonds Three Diamonds Six
## 1300 Diamonds Three Diamonds Ten
## 1301 Diamonds Three Hearts Ace
## 1302 Diamonds Three Hearts Deuce
## 1303 Diamonds Three Hearts Eight
## 1304 Diamonds Three Hearts Five
## 1305 Diamonds Three Hearts Four
## 1306 Diamonds Three Hearts Jack
## 1307 Diamonds Three Hearts King
## 1308 Diamonds Three Hearts Nine
## 1309 Diamonds Three Hearts Queen
## 1310 Diamonds Three Hearts Seven
## 1311 Diamonds Three Hearts Six
## 1312 Diamonds Three Hearts Ten
## 1313 Diamonds Three Hearts Three
## 1314 Diamonds Three Spades Ace
## 1315 Diamonds Three Spades Deuce
## 1316 Diamonds Three Spades Eight
## 1317 Diamonds Three Spades Five
## 1318 Diamonds Three Spades Four
## 1319 Diamonds Three Spades Jack
## 1320 Diamonds Three Spades King
## 1321 Diamonds Three Spades Nine
## 1322 Diamonds Three Spades Queen
## 1323 Diamonds Three Spades Seven
## 1324 Diamonds Three Spades Six
## 1325 Diamonds Three Spades Ten
## 1326 Diamonds Three Spades Three
## 1327 Hearts Ace Clubs Ace
## 1328 Hearts Ace Clubs Deuce
## 1329 Hearts Ace Clubs Eight
## 1330 Hearts Ace Clubs Five
## 1331 Hearts Ace Clubs Four
## 1332 Hearts Ace Clubs Jack
## 1333 Hearts Ace Clubs King
## 1334 Hearts Ace Clubs Nine
## 1335 Hearts Ace Clubs Queen
## 1336 Hearts Ace Clubs Seven
## 1337 Hearts Ace Clubs Six
## 1338 Hearts Ace Clubs Ten
## 1339 Hearts Ace Clubs Three
## 1340 Hearts Ace Diamonds Ace
## 1341 Hearts Ace Diamonds Deuce
## 1342 Hearts Ace Diamonds Eight
## 1343 Hearts Ace Diamonds Five
## 1344 Hearts Ace Diamonds Four
## 1345 Hearts Ace Diamonds Jack
## 1346 Hearts Ace Diamonds King
## 1347 Hearts Ace Diamonds Nine
## 1348 Hearts Ace Diamonds Queen
## 1349 Hearts Ace Diamonds Seven
## 1350 Hearts Ace Diamonds Six
## 1351 Hearts Ace Diamonds Ten
## 1352 Hearts Ace Diamonds Three
## 1353 Hearts Ace Hearts Deuce
## 1354 Hearts Ace Hearts Eight
## 1355 Hearts Ace Hearts Five
## 1356 Hearts Ace Hearts Four
## 1357 Hearts Ace Hearts Jack
## 1358 Hearts Ace Hearts King
## 1359 Hearts Ace Hearts Nine
## 1360 Hearts Ace Hearts Queen
## 1361 Hearts Ace Hearts Seven
## 1362 Hearts Ace Hearts Six
## 1363 Hearts Ace Hearts Ten
## 1364 Hearts Ace Hearts Three
## 1365 Hearts Ace Spades Ace
## 1366 Hearts Ace Spades Deuce
## 1367 Hearts Ace Spades Eight
## 1368 Hearts Ace Spades Five
## 1369 Hearts Ace Spades Four
## 1370 Hearts Ace Spades Jack
## 1371 Hearts Ace Spades King
## 1372 Hearts Ace Spades Nine
## 1373 Hearts Ace Spades Queen
## 1374 Hearts Ace Spades Seven
## 1375 Hearts Ace Spades Six
## 1376 Hearts Ace Spades Ten
## 1377 Hearts Ace Spades Three
## 1378 Hearts Deuce Clubs Ace
## 1379 Hearts Deuce Clubs Deuce
## 1380 Hearts Deuce Clubs Eight
## 1381 Hearts Deuce Clubs Five
## 1382 Hearts Deuce Clubs Four
## 1383 Hearts Deuce Clubs Jack
## 1384 Hearts Deuce Clubs King
## 1385 Hearts Deuce Clubs Nine
## 1386 Hearts Deuce Clubs Queen
## 1387 Hearts Deuce Clubs Seven
## 1388 Hearts Deuce Clubs Six
## 1389 Hearts Deuce Clubs Ten
## 1390 Hearts Deuce Clubs Three
## 1391 Hearts Deuce Diamonds Ace
## 1392 Hearts Deuce Diamonds Deuce
## 1393 Hearts Deuce Diamonds Eight
## 1394 Hearts Deuce Diamonds Five
## 1395 Hearts Deuce Diamonds Four
## 1396 Hearts Deuce Diamonds Jack
## 1397 Hearts Deuce Diamonds King
## 1398 Hearts Deuce Diamonds Nine
## 1399 Hearts Deuce Diamonds Queen
## 1400 Hearts Deuce Diamonds Seven
## 1401 Hearts Deuce Diamonds Six
## 1402 Hearts Deuce Diamonds Ten
## 1403 Hearts Deuce Diamonds Three
## 1404 Hearts Deuce Hearts Ace
## 1405 Hearts Deuce Hearts Eight
## 1406 Hearts Deuce Hearts Five
## 1407 Hearts Deuce Hearts Four
## 1408 Hearts Deuce Hearts Jack
## 1409 Hearts Deuce Hearts King
## 1410 Hearts Deuce Hearts Nine
## 1411 Hearts Deuce Hearts Queen
## 1412 Hearts Deuce Hearts Seven
## 1413 Hearts Deuce Hearts Six
## 1414 Hearts Deuce Hearts Ten
## 1415 Hearts Deuce Hearts Three
## 1416 Hearts Deuce Spades Ace
## 1417 Hearts Deuce Spades Deuce
## 1418 Hearts Deuce Spades Eight
## 1419 Hearts Deuce Spades Five
## 1420 Hearts Deuce Spades Four
## 1421 Hearts Deuce Spades Jack
## 1422 Hearts Deuce Spades King
## 1423 Hearts Deuce Spades Nine
## 1424 Hearts Deuce Spades Queen
## 1425 Hearts Deuce Spades Seven
## 1426 Hearts Deuce Spades Six
## 1427 Hearts Deuce Spades Ten
## 1428 Hearts Deuce Spades Three
## 1429 Hearts Eight Clubs Ace
## 1430 Hearts Eight Clubs Deuce
## 1431 Hearts Eight Clubs Eight
## 1432 Hearts Eight Clubs Five
## 1433 Hearts Eight Clubs Four
## 1434 Hearts Eight Clubs Jack
## 1435 Hearts Eight Clubs King
## 1436 Hearts Eight Clubs Nine
## 1437 Hearts Eight Clubs Queen
## 1438 Hearts Eight Clubs Seven
## 1439 Hearts Eight Clubs Six
## 1440 Hearts Eight Clubs Ten
## 1441 Hearts Eight Clubs Three
## 1442 Hearts Eight Diamonds Ace
## 1443 Hearts Eight Diamonds Deuce
## 1444 Hearts Eight Diamonds Eight
## 1445 Hearts Eight Diamonds Five
## 1446 Hearts Eight Diamonds Four
## 1447 Hearts Eight Diamonds Jack
## 1448 Hearts Eight Diamonds King
## 1449 Hearts Eight Diamonds Nine
## 1450 Hearts Eight Diamonds Queen
## 1451 Hearts Eight Diamonds Seven
## 1452 Hearts Eight Diamonds Six
## 1453 Hearts Eight Diamonds Ten
## 1454 Hearts Eight Diamonds Three
## 1455 Hearts Eight Hearts Ace
## 1456 Hearts Eight Hearts Deuce
## 1457 Hearts Eight Hearts Five
## 1458 Hearts Eight Hearts Four
## 1459 Hearts Eight Hearts Jack
## 1460 Hearts Eight Hearts King
## 1461 Hearts Eight Hearts Nine
## 1462 Hearts Eight Hearts Queen
## 1463 Hearts Eight Hearts Seven
## 1464 Hearts Eight Hearts Six
## 1465 Hearts Eight Hearts Ten
## 1466 Hearts Eight Hearts Three
## 1467 Hearts Eight Spades Ace
## 1468 Hearts Eight Spades Deuce
## 1469 Hearts Eight Spades Eight
## 1470 Hearts Eight Spades Five
## 1471 Hearts Eight Spades Four
## 1472 Hearts Eight Spades Jack
## 1473 Hearts Eight Spades King
## 1474 Hearts Eight Spades Nine
## 1475 Hearts Eight Spades Queen
## 1476 Hearts Eight Spades Seven
## 1477 Hearts Eight Spades Six
## 1478 Hearts Eight Spades Ten
## 1479 Hearts Eight Spades Three
## 1480 Hearts Five Clubs Ace
## 1481 Hearts Five Clubs Deuce
## 1482 Hearts Five Clubs Eight
## 1483 Hearts Five Clubs Five
## 1484 Hearts Five Clubs Four
## 1485 Hearts Five Clubs Jack
## 1486 Hearts Five Clubs King
## 1487 Hearts Five Clubs Nine
## 1488 Hearts Five Clubs Queen
## 1489 Hearts Five Clubs Seven
## 1490 Hearts Five Clubs Six
## 1491 Hearts Five Clubs Ten
## 1492 Hearts Five Clubs Three
## 1493 Hearts Five Diamonds Ace
## 1494 Hearts Five Diamonds Deuce
## 1495 Hearts Five Diamonds Eight
## 1496 Hearts Five Diamonds Five
## 1497 Hearts Five Diamonds Four
## 1498 Hearts Five Diamonds Jack
## 1499 Hearts Five Diamonds King
## 1500 Hearts Five Diamonds Nine
## 1501 Hearts Five Diamonds Queen
## 1502 Hearts Five Diamonds Seven
## 1503 Hearts Five Diamonds Six
## 1504 Hearts Five Diamonds Ten
## 1505 Hearts Five Diamonds Three
## 1506 Hearts Five Hearts Ace
## 1507 Hearts Five Hearts Deuce
## 1508 Hearts Five Hearts Eight
## 1509 Hearts Five Hearts Four
## 1510 Hearts Five Hearts Jack
## 1511 Hearts Five Hearts King
## 1512 Hearts Five Hearts Nine
## 1513 Hearts Five Hearts Queen
## 1514 Hearts Five Hearts Seven
## 1515 Hearts Five Hearts Six
## 1516 Hearts Five Hearts Ten
## 1517 Hearts Five Hearts Three
## 1518 Hearts Five Spades Ace
## 1519 Hearts Five Spades Deuce
## 1520 Hearts Five Spades Eight
## 1521 Hearts Five Spades Five
## 1522 Hearts Five Spades Four
## 1523 Hearts Five Spades Jack
## 1524 Hearts Five Spades King
## 1525 Hearts Five Spades Nine
## 1526 Hearts Five Spades Queen
## 1527 Hearts Five Spades Seven
## 1528 Hearts Five Spades Six
## 1529 Hearts Five Spades Ten
## 1530 Hearts Five Spades Three
## 1531 Hearts Four Clubs Ace
## 1532 Hearts Four Clubs Deuce
## 1533 Hearts Four Clubs Eight
## 1534 Hearts Four Clubs Five
## 1535 Hearts Four Clubs Four
## 1536 Hearts Four Clubs Jack
## 1537 Hearts Four Clubs King
## 1538 Hearts Four Clubs Nine
## 1539 Hearts Four Clubs Queen
## 1540 Hearts Four Clubs Seven
## 1541 Hearts Four Clubs Six
## 1542 Hearts Four Clubs Ten
## 1543 Hearts Four Clubs Three
## 1544 Hearts Four Diamonds Ace
## 1545 Hearts Four Diamonds Deuce
## 1546 Hearts Four Diamonds Eight
## 1547 Hearts Four Diamonds Five
## 1548 Hearts Four Diamonds Four
## 1549 Hearts Four Diamonds Jack
## 1550 Hearts Four Diamonds King
## 1551 Hearts Four Diamonds Nine
## 1552 Hearts Four Diamonds Queen
## 1553 Hearts Four Diamonds Seven
## 1554 Hearts Four Diamonds Six
## 1555 Hearts Four Diamonds Ten
## 1556 Hearts Four Diamonds Three
## 1557 Hearts Four Hearts Ace
## 1558 Hearts Four Hearts Deuce
## 1559 Hearts Four Hearts Eight
## 1560 Hearts Four Hearts Five
## 1561 Hearts Four Hearts Jack
## 1562 Hearts Four Hearts King
## 1563 Hearts Four Hearts Nine
## 1564 Hearts Four Hearts Queen
## 1565 Hearts Four Hearts Seven
## 1566 Hearts Four Hearts Six
## 1567 Hearts Four Hearts Ten
## 1568 Hearts Four Hearts Three
## 1569 Hearts Four Spades Ace
## 1570 Hearts Four Spades Deuce
## 1571 Hearts Four Spades Eight
## 1572 Hearts Four Spades Five
## 1573 Hearts Four Spades Four
## 1574 Hearts Four Spades Jack
## 1575 Hearts Four Spades King
## 1576 Hearts Four Spades Nine
## 1577 Hearts Four Spades Queen
## 1578 Hearts Four Spades Seven
## 1579 Hearts Four Spades Six
## 1580 Hearts Four Spades Ten
## 1581 Hearts Four Spades Three
## 1582 Hearts Jack Clubs Ace
## 1583 Hearts Jack Clubs Deuce
## 1584 Hearts Jack Clubs Eight
## 1585 Hearts Jack Clubs Five
## 1586 Hearts Jack Clubs Four
## 1587 Hearts Jack Clubs Jack
## 1588 Hearts Jack Clubs King
## 1589 Hearts Jack Clubs Nine
## 1590 Hearts Jack Clubs Queen
## 1591 Hearts Jack Clubs Seven
## 1592 Hearts Jack Clubs Six
## 1593 Hearts Jack Clubs Ten
## 1594 Hearts Jack Clubs Three
## 1595 Hearts Jack Diamonds Ace
## 1596 Hearts Jack Diamonds Deuce
## 1597 Hearts Jack Diamonds Eight
## 1598 Hearts Jack Diamonds Five
## 1599 Hearts Jack Diamonds Four
## 1600 Hearts Jack Diamonds Jack
## 1601 Hearts Jack Diamonds King
## 1602 Hearts Jack Diamonds Nine
## 1603 Hearts Jack Diamonds Queen
## 1604 Hearts Jack Diamonds Seven
## 1605 Hearts Jack Diamonds Six
## 1606 Hearts Jack Diamonds Ten
## 1607 Hearts Jack Diamonds Three
## 1608 Hearts Jack Hearts Ace
## 1609 Hearts Jack Hearts Deuce
## 1610 Hearts Jack Hearts Eight
## 1611 Hearts Jack Hearts Five
## 1612 Hearts Jack Hearts Four
## 1613 Hearts Jack Hearts King
## 1614 Hearts Jack Hearts Nine
## 1615 Hearts Jack Hearts Queen
## 1616 Hearts Jack Hearts Seven
## 1617 Hearts Jack Hearts Six
## 1618 Hearts Jack Hearts Ten
## 1619 Hearts Jack Hearts Three
## 1620 Hearts Jack Spades Ace
## 1621 Hearts Jack Spades Deuce
## 1622 Hearts Jack Spades Eight
## 1623 Hearts Jack Spades Five
## 1624 Hearts Jack Spades Four
## 1625 Hearts Jack Spades Jack
## 1626 Hearts Jack Spades King
## 1627 Hearts Jack Spades Nine
## 1628 Hearts Jack Spades Queen
## 1629 Hearts Jack Spades Seven
## 1630 Hearts Jack Spades Six
## 1631 Hearts Jack Spades Ten
## 1632 Hearts Jack Spades Three
## 1633 Hearts King Clubs Ace
## 1634 Hearts King Clubs Deuce
## 1635 Hearts King Clubs Eight
## 1636 Hearts King Clubs Five
## 1637 Hearts King Clubs Four
## 1638 Hearts King Clubs Jack
## 1639 Hearts King Clubs King
## 1640 Hearts King Clubs Nine
## 1641 Hearts King Clubs Queen
## 1642 Hearts King Clubs Seven
## 1643 Hearts King Clubs Six
## 1644 Hearts King Clubs Ten
## 1645 Hearts King Clubs Three
## 1646 Hearts King Diamonds Ace
## 1647 Hearts King Diamonds Deuce
## 1648 Hearts King Diamonds Eight
## 1649 Hearts King Diamonds Five
## 1650 Hearts King Diamonds Four
## 1651 Hearts King Diamonds Jack
## 1652 Hearts King Diamonds King
## 1653 Hearts King Diamonds Nine
## 1654 Hearts King Diamonds Queen
## 1655 Hearts King Diamonds Seven
## 1656 Hearts King Diamonds Six
## 1657 Hearts King Diamonds Ten
## 1658 Hearts King Diamonds Three
## 1659 Hearts King Hearts Ace
## 1660 Hearts King Hearts Deuce
## 1661 Hearts King Hearts Eight
## 1662 Hearts King Hearts Five
## 1663 Hearts King Hearts Four
## 1664 Hearts King Hearts Jack
## 1665 Hearts King Hearts Nine
## 1666 Hearts King Hearts Queen
## 1667 Hearts King Hearts Seven
## 1668 Hearts King Hearts Six
## 1669 Hearts King Hearts Ten
## 1670 Hearts King Hearts Three
## 1671 Hearts King Spades Ace
## 1672 Hearts King Spades Deuce
## 1673 Hearts King Spades Eight
## 1674 Hearts King Spades Five
## 1675 Hearts King Spades Four
## 1676 Hearts King Spades Jack
## 1677 Hearts King Spades King
## 1678 Hearts King Spades Nine
## 1679 Hearts King Spades Queen
## 1680 Hearts King Spades Seven
## 1681 Hearts King Spades Six
## 1682 Hearts King Spades Ten
## 1683 Hearts King Spades Three
## 1684 Hearts Nine Clubs Ace
## 1685 Hearts Nine Clubs Deuce
## 1686 Hearts Nine Clubs Eight
## 1687 Hearts Nine Clubs Five
## 1688 Hearts Nine Clubs Four
## 1689 Hearts Nine Clubs Jack
## 1690 Hearts Nine Clubs King
## 1691 Hearts Nine Clubs Nine
## 1692 Hearts Nine Clubs Queen
## 1693 Hearts Nine Clubs Seven
## 1694 Hearts Nine Clubs Six
## 1695 Hearts Nine Clubs Ten
## 1696 Hearts Nine Clubs Three
## 1697 Hearts Nine Diamonds Ace
## 1698 Hearts Nine Diamonds Deuce
## 1699 Hearts Nine Diamonds Eight
## 1700 Hearts Nine Diamonds Five
## 1701 Hearts Nine Diamonds Four
## 1702 Hearts Nine Diamonds Jack
## 1703 Hearts Nine Diamonds King
## 1704 Hearts Nine Diamonds Nine
## 1705 Hearts Nine Diamonds Queen
## 1706 Hearts Nine Diamonds Seven
## 1707 Hearts Nine Diamonds Six
## 1708 Hearts Nine Diamonds Ten
## 1709 Hearts Nine Diamonds Three
## 1710 Hearts Nine Hearts Ace
## 1711 Hearts Nine Hearts Deuce
## 1712 Hearts Nine Hearts Eight
## 1713 Hearts Nine Hearts Five
## 1714 Hearts Nine Hearts Four
## 1715 Hearts Nine Hearts Jack
## 1716 Hearts Nine Hearts King
## 1717 Hearts Nine Hearts Queen
## 1718 Hearts Nine Hearts Seven
## 1719 Hearts Nine Hearts Six
## 1720 Hearts Nine Hearts Ten
## 1721 Hearts Nine Hearts Three
## 1722 Hearts Nine Spades Ace
## 1723 Hearts Nine Spades Deuce
## 1724 Hearts Nine Spades Eight
## 1725 Hearts Nine Spades Five
## 1726 Hearts Nine Spades Four
## 1727 Hearts Nine Spades Jack
## 1728 Hearts Nine Spades King
## 1729 Hearts Nine Spades Nine
## 1730 Hearts Nine Spades Queen
## 1731 Hearts Nine Spades Seven
## 1732 Hearts Nine Spades Six
## 1733 Hearts Nine Spades Ten
## 1734 Hearts Nine Spades Three
## 1735 Hearts Queen Clubs Ace
## 1736 Hearts Queen Clubs Deuce
## 1737 Hearts Queen Clubs Eight
## 1738 Hearts Queen Clubs Five
## 1739 Hearts Queen Clubs Four
## 1740 Hearts Queen Clubs Jack
## 1741 Hearts Queen Clubs King
## 1742 Hearts Queen Clubs Nine
## 1743 Hearts Queen Clubs Queen
## 1744 Hearts Queen Clubs Seven
## 1745 Hearts Queen Clubs Six
## 1746 Hearts Queen Clubs Ten
## 1747 Hearts Queen Clubs Three
## 1748 Hearts Queen Diamonds Ace
## 1749 Hearts Queen Diamonds Deuce
## 1750 Hearts Queen Diamonds Eight
## 1751 Hearts Queen Diamonds Five
## 1752 Hearts Queen Diamonds Four
## 1753 Hearts Queen Diamonds Jack
## 1754 Hearts Queen Diamonds King
## 1755 Hearts Queen Diamonds Nine
## 1756 Hearts Queen Diamonds Queen
## 1757 Hearts Queen Diamonds Seven
## 1758 Hearts Queen Diamonds Six
## 1759 Hearts Queen Diamonds Ten
## 1760 Hearts Queen Diamonds Three
## 1761 Hearts Queen Hearts Ace
## 1762 Hearts Queen Hearts Deuce
## 1763 Hearts Queen Hearts Eight
## 1764 Hearts Queen Hearts Five
## 1765 Hearts Queen Hearts Four
## 1766 Hearts Queen Hearts Jack
## 1767 Hearts Queen Hearts King
## 1768 Hearts Queen Hearts Nine
## 1769 Hearts Queen Hearts Seven
## 1770 Hearts Queen Hearts Six
## 1771 Hearts Queen Hearts Ten
## 1772 Hearts Queen Hearts Three
## 1773 Hearts Queen Spades Ace
## 1774 Hearts Queen Spades Deuce
## 1775 Hearts Queen Spades Eight
## 1776 Hearts Queen Spades Five
## 1777 Hearts Queen Spades Four
## 1778 Hearts Queen Spades Jack
## 1779 Hearts Queen Spades King
## 1780 Hearts Queen Spades Nine
## 1781 Hearts Queen Spades Queen
## 1782 Hearts Queen Spades Seven
## 1783 Hearts Queen Spades Six
## 1784 Hearts Queen Spades Ten
## 1785 Hearts Queen Spades Three
## 1786 Hearts Seven Clubs Ace
## 1787 Hearts Seven Clubs Deuce
## 1788 Hearts Seven Clubs Eight
## 1789 Hearts Seven Clubs Five
## 1790 Hearts Seven Clubs Four
## 1791 Hearts Seven Clubs Jack
## 1792 Hearts Seven Clubs King
## 1793 Hearts Seven Clubs Nine
## 1794 Hearts Seven Clubs Queen
## 1795 Hearts Seven Clubs Seven
## 1796 Hearts Seven Clubs Six
## 1797 Hearts Seven Clubs Ten
## 1798 Hearts Seven Clubs Three
## 1799 Hearts Seven Diamonds Ace
## 1800 Hearts Seven Diamonds Deuce
## 1801 Hearts Seven Diamonds Eight
## 1802 Hearts Seven Diamonds Five
## 1803 Hearts Seven Diamonds Four
## 1804 Hearts Seven Diamonds Jack
## 1805 Hearts Seven Diamonds King
## 1806 Hearts Seven Diamonds Nine
## 1807 Hearts Seven Diamonds Queen
## 1808 Hearts Seven Diamonds Seven
## 1809 Hearts Seven Diamonds Six
## 1810 Hearts Seven Diamonds Ten
## 1811 Hearts Seven Diamonds Three
## 1812 Hearts Seven Hearts Ace
## 1813 Hearts Seven Hearts Deuce
## 1814 Hearts Seven Hearts Eight
## 1815 Hearts Seven Hearts Five
## 1816 Hearts Seven Hearts Four
## 1817 Hearts Seven Hearts Jack
## 1818 Hearts Seven Hearts King
## 1819 Hearts Seven Hearts Nine
## 1820 Hearts Seven Hearts Queen
## 1821 Hearts Seven Hearts Six
## 1822 Hearts Seven Hearts Ten
## 1823 Hearts Seven Hearts Three
## 1824 Hearts Seven Spades Ace
## 1825 Hearts Seven Spades Deuce
## 1826 Hearts Seven Spades Eight
## 1827 Hearts Seven Spades Five
## 1828 Hearts Seven Spades Four
## 1829 Hearts Seven Spades Jack
## 1830 Hearts Seven Spades King
## 1831 Hearts Seven Spades Nine
## 1832 Hearts Seven Spades Queen
## 1833 Hearts Seven Spades Seven
## 1834 Hearts Seven Spades Six
## 1835 Hearts Seven Spades Ten
## 1836 Hearts Seven Spades Three
## 1837 Hearts Six Clubs Ace
## 1838 Hearts Six Clubs Deuce
## 1839 Hearts Six Clubs Eight
## 1840 Hearts Six Clubs Five
## 1841 Hearts Six Clubs Four
## 1842 Hearts Six Clubs Jack
## 1843 Hearts Six Clubs King
## 1844 Hearts Six Clubs Nine
## 1845 Hearts Six Clubs Queen
## 1846 Hearts Six Clubs Seven
## 1847 Hearts Six Clubs Six
## 1848 Hearts Six Clubs Ten
## 1849 Hearts Six Clubs Three
## 1850 Hearts Six Diamonds Ace
## 1851 Hearts Six Diamonds Deuce
## 1852 Hearts Six Diamonds Eight
## 1853 Hearts Six Diamonds Five
## 1854 Hearts Six Diamonds Four
## 1855 Hearts Six Diamonds Jack
## 1856 Hearts Six Diamonds King
## 1857 Hearts Six Diamonds Nine
## 1858 Hearts Six Diamonds Queen
## 1859 Hearts Six Diamonds Seven
## 1860 Hearts Six Diamonds Six
## 1861 Hearts Six Diamonds Ten
## 1862 Hearts Six Diamonds Three
## 1863 Hearts Six Hearts Ace
## 1864 Hearts Six Hearts Deuce
## 1865 Hearts Six Hearts Eight
## 1866 Hearts Six Hearts Five
## 1867 Hearts Six Hearts Four
## 1868 Hearts Six Hearts Jack
## 1869 Hearts Six Hearts King
## 1870 Hearts Six Hearts Nine
## 1871 Hearts Six Hearts Queen
## 1872 Hearts Six Hearts Seven
## 1873 Hearts Six Hearts Ten
## 1874 Hearts Six Hearts Three
## 1875 Hearts Six Spades Ace
## 1876 Hearts Six Spades Deuce
## 1877 Hearts Six Spades Eight
## 1878 Hearts Six Spades Five
## 1879 Hearts Six Spades Four
## 1880 Hearts Six Spades Jack
## 1881 Hearts Six Spades King
## 1882 Hearts Six Spades Nine
## 1883 Hearts Six Spades Queen
## 1884 Hearts Six Spades Seven
## 1885 Hearts Six Spades Six
## 1886 Hearts Six Spades Ten
## 1887 Hearts Six Spades Three
## 1888 Hearts Ten Clubs Ace
## 1889 Hearts Ten Clubs Deuce
## 1890 Hearts Ten Clubs Eight
## 1891 Hearts Ten Clubs Five
## 1892 Hearts Ten Clubs Four
## 1893 Hearts Ten Clubs Jack
## 1894 Hearts Ten Clubs King
## 1895 Hearts Ten Clubs Nine
## 1896 Hearts Ten Clubs Queen
## 1897 Hearts Ten Clubs Seven
## 1898 Hearts Ten Clubs Six
## 1899 Hearts Ten Clubs Ten
## 1900 Hearts Ten Clubs Three
## 1901 Hearts Ten Diamonds Ace
## 1902 Hearts Ten Diamonds Deuce
## 1903 Hearts Ten Diamonds Eight
## 1904 Hearts Ten Diamonds Five
## 1905 Hearts Ten Diamonds Four
## 1906 Hearts Ten Diamonds Jack
## 1907 Hearts Ten Diamonds King
## 1908 Hearts Ten Diamonds Nine
## 1909 Hearts Ten Diamonds Queen
## 1910 Hearts Ten Diamonds Seven
## 1911 Hearts Ten Diamonds Six
## 1912 Hearts Ten Diamonds Ten
## 1913 Hearts Ten Diamonds Three
## 1914 Hearts Ten Hearts Ace
## 1915 Hearts Ten Hearts Deuce
## 1916 Hearts Ten Hearts Eight
## 1917 Hearts Ten Hearts Five
## 1918 Hearts Ten Hearts Four
## 1919 Hearts Ten Hearts Jack
## 1920 Hearts Ten Hearts King
## 1921 Hearts Ten Hearts Nine
## 1922 Hearts Ten Hearts Queen
## 1923 Hearts Ten Hearts Seven
## 1924 Hearts Ten Hearts Six
## 1925 Hearts Ten Hearts Three
## 1926 Hearts Ten Spades Ace
## 1927 Hearts Ten Spades Deuce
## 1928 Hearts Ten Spades Eight
## 1929 Hearts Ten Spades Five
## 1930 Hearts Ten Spades Four
## 1931 Hearts Ten Spades Jack
## 1932 Hearts Ten Spades King
## 1933 Hearts Ten Spades Nine
## 1934 Hearts Ten Spades Queen
## 1935 Hearts Ten Spades Seven
## 1936 Hearts Ten Spades Six
## 1937 Hearts Ten Spades Ten
## 1938 Hearts Ten Spades Three
## 1939 Hearts Three Clubs Ace
## 1940 Hearts Three Clubs Deuce
## 1941 Hearts Three Clubs Eight
## 1942 Hearts Three Clubs Five
## 1943 Hearts Three Clubs Four
## 1944 Hearts Three Clubs Jack
## 1945 Hearts Three Clubs King
## 1946 Hearts Three Clubs Nine
## 1947 Hearts Three Clubs Queen
## 1948 Hearts Three Clubs Seven
## 1949 Hearts Three Clubs Six
## 1950 Hearts Three Clubs Ten
## 1951 Hearts Three Clubs Three
## 1952 Hearts Three Diamonds Ace
## 1953 Hearts Three Diamonds Deuce
## 1954 Hearts Three Diamonds Eight
## 1955 Hearts Three Diamonds Five
## 1956 Hearts Three Diamonds Four
## 1957 Hearts Three Diamonds Jack
## 1958 Hearts Three Diamonds King
## 1959 Hearts Three Diamonds Nine
## 1960 Hearts Three Diamonds Queen
## 1961 Hearts Three Diamonds Seven
## 1962 Hearts Three Diamonds Six
## 1963 Hearts Three Diamonds Ten
## 1964 Hearts Three Diamonds Three
## 1965 Hearts Three Hearts Ace
## 1966 Hearts Three Hearts Deuce
## 1967 Hearts Three Hearts Eight
## 1968 Hearts Three Hearts Five
## 1969 Hearts Three Hearts Four
## 1970 Hearts Three Hearts Jack
## 1971 Hearts Three Hearts King
## 1972 Hearts Three Hearts Nine
## 1973 Hearts Three Hearts Queen
## 1974 Hearts Three Hearts Seven
## 1975 Hearts Three Hearts Six
## 1976 Hearts Three Hearts Ten
## 1977 Hearts Three Spades Ace
## 1978 Hearts Three Spades Deuce
## 1979 Hearts Three Spades Eight
## 1980 Hearts Three Spades Five
## 1981 Hearts Three Spades Four
## 1982 Hearts Three Spades Jack
## 1983 Hearts Three Spades King
## 1984 Hearts Three Spades Nine
## 1985 Hearts Three Spades Queen
## 1986 Hearts Three Spades Seven
## 1987 Hearts Three Spades Six
## 1988 Hearts Three Spades Ten
## 1989 Hearts Three Spades Three
## 1990 Spades Ace Clubs Ace
## 1991 Spades Ace Clubs Deuce
## 1992 Spades Ace Clubs Eight
## 1993 Spades Ace Clubs Five
## 1994 Spades Ace Clubs Four
## 1995 Spades Ace Clubs Jack
## 1996 Spades Ace Clubs King
## 1997 Spades Ace Clubs Nine
## 1998 Spades Ace Clubs Queen
## 1999 Spades Ace Clubs Seven
## 2000 Spades Ace Clubs Six
## 2001 Spades Ace Clubs Ten
## 2002 Spades Ace Clubs Three
## 2003 Spades Ace Diamonds Ace
## 2004 Spades Ace Diamonds Deuce
## 2005 Spades Ace Diamonds Eight
## 2006 Spades Ace Diamonds Five
## 2007 Spades Ace Diamonds Four
## 2008 Spades Ace Diamonds Jack
## 2009 Spades Ace Diamonds King
## 2010 Spades Ace Diamonds Nine
## 2011 Spades Ace Diamonds Queen
## 2012 Spades Ace Diamonds Seven
## 2013 Spades Ace Diamonds Six
## 2014 Spades Ace Diamonds Ten
## 2015 Spades Ace Diamonds Three
## 2016 Spades Ace Hearts Ace
## 2017 Spades Ace Hearts Deuce
## 2018 Spades Ace Hearts Eight
## 2019 Spades Ace Hearts Five
## 2020 Spades Ace Hearts Four
## 2021 Spades Ace Hearts Jack
## 2022 Spades Ace Hearts King
## 2023 Spades Ace Hearts Nine
## 2024 Spades Ace Hearts Queen
## 2025 Spades Ace Hearts Seven
## 2026 Spades Ace Hearts Six
## 2027 Spades Ace Hearts Ten
## 2028 Spades Ace Hearts Three
## 2029 Spades Ace Spades Deuce
## 2030 Spades Ace Spades Eight
## 2031 Spades Ace Spades Five
## 2032 Spades Ace Spades Four
## 2033 Spades Ace Spades Jack
## 2034 Spades Ace Spades King
## 2035 Spades Ace Spades Nine
## 2036 Spades Ace Spades Queen
## 2037 Spades Ace Spades Seven
## 2038 Spades Ace Spades Six
## 2039 Spades Ace Spades Ten
## 2040 Spades Ace Spades Three
## 2041 Spades Deuce Clubs Ace
## 2042 Spades Deuce Clubs Deuce
## 2043 Spades Deuce Clubs Eight
## 2044 Spades Deuce Clubs Five
## 2045 Spades Deuce Clubs Four
## 2046 Spades Deuce Clubs Jack
## 2047 Spades Deuce Clubs King
## 2048 Spades Deuce Clubs Nine
## 2049 Spades Deuce Clubs Queen
## 2050 Spades Deuce Clubs Seven
## 2051 Spades Deuce Clubs Six
## 2052 Spades Deuce Clubs Ten
## 2053 Spades Deuce Clubs Three
## 2054 Spades Deuce Diamonds Ace
## 2055 Spades Deuce Diamonds Deuce
## 2056 Spades Deuce Diamonds Eight
## 2057 Spades Deuce Diamonds Five
## 2058 Spades Deuce Diamonds Four
## 2059 Spades Deuce Diamonds Jack
## 2060 Spades Deuce Diamonds King
## 2061 Spades Deuce Diamonds Nine
## 2062 Spades Deuce Diamonds Queen
## 2063 Spades Deuce Diamonds Seven
## 2064 Spades Deuce Diamonds Six
## 2065 Spades Deuce Diamonds Ten
## 2066 Spades Deuce Diamonds Three
## 2067 Spades Deuce Hearts Ace
## 2068 Spades Deuce Hearts Deuce
## 2069 Spades Deuce Hearts Eight
## 2070 Spades Deuce Hearts Five
## 2071 Spades Deuce Hearts Four
## 2072 Spades Deuce Hearts Jack
## 2073 Spades Deuce Hearts King
## 2074 Spades Deuce Hearts Nine
## 2075 Spades Deuce Hearts Queen
## 2076 Spades Deuce Hearts Seven
## 2077 Spades Deuce Hearts Six
## 2078 Spades Deuce Hearts Ten
## 2079 Spades Deuce Hearts Three
## 2080 Spades Deuce Spades Ace
## 2081 Spades Deuce Spades Eight
## 2082 Spades Deuce Spades Five
## 2083 Spades Deuce Spades Four
## 2084 Spades Deuce Spades Jack
## 2085 Spades Deuce Spades King
## 2086 Spades Deuce Spades Nine
## 2087 Spades Deuce Spades Queen
## 2088 Spades Deuce Spades Seven
## 2089 Spades Deuce Spades Six
## 2090 Spades Deuce Spades Ten
## 2091 Spades Deuce Spades Three
## 2092 Spades Eight Clubs Ace
## 2093 Spades Eight Clubs Deuce
## 2094 Spades Eight Clubs Eight
## 2095 Spades Eight Clubs Five
## 2096 Spades Eight Clubs Four
## 2097 Spades Eight Clubs Jack
## 2098 Spades Eight Clubs King
## 2099 Spades Eight Clubs Nine
## 2100 Spades Eight Clubs Queen
## 2101 Spades Eight Clubs Seven
## 2102 Spades Eight Clubs Six
## 2103 Spades Eight Clubs Ten
## 2104 Spades Eight Clubs Three
## 2105 Spades Eight Diamonds Ace
## 2106 Spades Eight Diamonds Deuce
## 2107 Spades Eight Diamonds Eight
## 2108 Spades Eight Diamonds Five
## 2109 Spades Eight Diamonds Four
## 2110 Spades Eight Diamonds Jack
## 2111 Spades Eight Diamonds King
## 2112 Spades Eight Diamonds Nine
## 2113 Spades Eight Diamonds Queen
## 2114 Spades Eight Diamonds Seven
## 2115 Spades Eight Diamonds Six
## 2116 Spades Eight Diamonds Ten
## 2117 Spades Eight Diamonds Three
## 2118 Spades Eight Hearts Ace
## 2119 Spades Eight Hearts Deuce
## 2120 Spades Eight Hearts Eight
## 2121 Spades Eight Hearts Five
## 2122 Spades Eight Hearts Four
## 2123 Spades Eight Hearts Jack
## 2124 Spades Eight Hearts King
## 2125 Spades Eight Hearts Nine
## 2126 Spades Eight Hearts Queen
## 2127 Spades Eight Hearts Seven
## 2128 Spades Eight Hearts Six
## 2129 Spades Eight Hearts Ten
## 2130 Spades Eight Hearts Three
## 2131 Spades Eight Spades Ace
## 2132 Spades Eight Spades Deuce
## 2133 Spades Eight Spades Five
## 2134 Spades Eight Spades Four
## 2135 Spades Eight Spades Jack
## 2136 Spades Eight Spades King
## 2137 Spades Eight Spades Nine
## 2138 Spades Eight Spades Queen
## 2139 Spades Eight Spades Seven
## 2140 Spades Eight Spades Six
## 2141 Spades Eight Spades Ten
## 2142 Spades Eight Spades Three
## 2143 Spades Five Clubs Ace
## 2144 Spades Five Clubs Deuce
## 2145 Spades Five Clubs Eight
## 2146 Spades Five Clubs Five
## 2147 Spades Five Clubs Four
## 2148 Spades Five Clubs Jack
## 2149 Spades Five Clubs King
## 2150 Spades Five Clubs Nine
## 2151 Spades Five Clubs Queen
## 2152 Spades Five Clubs Seven
## 2153 Spades Five Clubs Six
## 2154 Spades Five Clubs Ten
## 2155 Spades Five Clubs Three
## 2156 Spades Five Diamonds Ace
## 2157 Spades Five Diamonds Deuce
## 2158 Spades Five Diamonds Eight
## 2159 Spades Five Diamonds Five
## 2160 Spades Five Diamonds Four
## 2161 Spades Five Diamonds Jack
## 2162 Spades Five Diamonds King
## 2163 Spades Five Diamonds Nine
## 2164 Spades Five Diamonds Queen
## 2165 Spades Five Diamonds Seven
## 2166 Spades Five Diamonds Six
## 2167 Spades Five Diamonds Ten
## 2168 Spades Five Diamonds Three
## 2169 Spades Five Hearts Ace
## 2170 Spades Five Hearts Deuce
## 2171 Spades Five Hearts Eight
## 2172 Spades Five Hearts Five
## 2173 Spades Five Hearts Four
## 2174 Spades Five Hearts Jack
## 2175 Spades Five Hearts King
## 2176 Spades Five Hearts Nine
## 2177 Spades Five Hearts Queen
## 2178 Spades Five Hearts Seven
## 2179 Spades Five Hearts Six
## 2180 Spades Five Hearts Ten
## 2181 Spades Five Hearts Three
## 2182 Spades Five Spades Ace
## 2183 Spades Five Spades Deuce
## 2184 Spades Five Spades Eight
## 2185 Spades Five Spades Four
## 2186 Spades Five Spades Jack
## 2187 Spades Five Spades King
## 2188 Spades Five Spades Nine
## 2189 Spades Five Spades Queen
## 2190 Spades Five Spades Seven
## 2191 Spades Five Spades Six
## 2192 Spades Five Spades Ten
## 2193 Spades Five Spades Three
## 2194 Spades Four Clubs Ace
## 2195 Spades Four Clubs Deuce
## 2196 Spades Four Clubs Eight
## 2197 Spades Four Clubs Five
## 2198 Spades Four Clubs Four
## 2199 Spades Four Clubs Jack
## 2200 Spades Four Clubs King
## 2201 Spades Four Clubs Nine
## 2202 Spades Four Clubs Queen
## 2203 Spades Four Clubs Seven
## 2204 Spades Four Clubs Six
## 2205 Spades Four Clubs Ten
## 2206 Spades Four Clubs Three
## 2207 Spades Four Diamonds Ace
## 2208 Spades Four Diamonds Deuce
## 2209 Spades Four Diamonds Eight
## 2210 Spades Four Diamonds Five
## 2211 Spades Four Diamonds Four
## 2212 Spades Four Diamonds Jack
## 2213 Spades Four Diamonds King
## 2214 Spades Four Diamonds Nine
## 2215 Spades Four Diamonds Queen
## 2216 Spades Four Diamonds Seven
## 2217 Spades Four Diamonds Six
## 2218 Spades Four Diamonds Ten
## 2219 Spades Four Diamonds Three
## 2220 Spades Four Hearts Ace
## 2221 Spades Four Hearts Deuce
## 2222 Spades Four Hearts Eight
## 2223 Spades Four Hearts Five
## 2224 Spades Four Hearts Four
## 2225 Spades Four Hearts Jack
## 2226 Spades Four Hearts King
## 2227 Spades Four Hearts Nine
## 2228 Spades Four Hearts Queen
## 2229 Spades Four Hearts Seven
## 2230 Spades Four Hearts Six
## 2231 Spades Four Hearts Ten
## 2232 Spades Four Hearts Three
## 2233 Spades Four Spades Ace
## 2234 Spades Four Spades Deuce
## 2235 Spades Four Spades Eight
## 2236 Spades Four Spades Five
## 2237 Spades Four Spades Jack
## 2238 Spades Four Spades King
## 2239 Spades Four Spades Nine
## 2240 Spades Four Spades Queen
## 2241 Spades Four Spades Seven
## 2242 Spades Four Spades Six
## 2243 Spades Four Spades Ten
## 2244 Spades Four Spades Three
## 2245 Spades Jack Clubs Ace
## 2246 Spades Jack Clubs Deuce
## 2247 Spades Jack Clubs Eight
## 2248 Spades Jack Clubs Five
## 2249 Spades Jack Clubs Four
## 2250 Spades Jack Clubs Jack
## 2251 Spades Jack Clubs King
## 2252 Spades Jack Clubs Nine
## 2253 Spades Jack Clubs Queen
## 2254 Spades Jack Clubs Seven
## 2255 Spades Jack Clubs Six
## 2256 Spades Jack Clubs Ten
## 2257 Spades Jack Clubs Three
## 2258 Spades Jack Diamonds Ace
## 2259 Spades Jack Diamonds Deuce
## 2260 Spades Jack Diamonds Eight
## 2261 Spades Jack Diamonds Five
## 2262 Spades Jack Diamonds Four
## 2263 Spades Jack Diamonds Jack
## 2264 Spades Jack Diamonds King
## 2265 Spades Jack Diamonds Nine
## 2266 Spades Jack Diamonds Queen
## 2267 Spades Jack Diamonds Seven
## 2268 Spades Jack Diamonds Six
## 2269 Spades Jack Diamonds Ten
## 2270 Spades Jack Diamonds Three
## 2271 Spades Jack Hearts Ace
## 2272 Spades Jack Hearts Deuce
## 2273 Spades Jack Hearts Eight
## 2274 Spades Jack Hearts Five
## 2275 Spades Jack Hearts Four
## 2276 Spades Jack Hearts Jack
## 2277 Spades Jack Hearts King
## 2278 Spades Jack Hearts Nine
## 2279 Spades Jack Hearts Queen
## 2280 Spades Jack Hearts Seven
## 2281 Spades Jack Hearts Six
## 2282 Spades Jack Hearts Ten
## 2283 Spades Jack Hearts Three
## 2284 Spades Jack Spades Ace
## 2285 Spades Jack Spades Deuce
## 2286 Spades Jack Spades Eight
## 2287 Spades Jack Spades Five
## 2288 Spades Jack Spades Four
## 2289 Spades Jack Spades King
## 2290 Spades Jack Spades Nine
## 2291 Spades Jack Spades Queen
## 2292 Spades Jack Spades Seven
## 2293 Spades Jack Spades Six
## 2294 Spades Jack Spades Ten
## 2295 Spades Jack Spades Three
## 2296 Spades King Clubs Ace
## 2297 Spades King Clubs Deuce
## 2298 Spades King Clubs Eight
## 2299 Spades King Clubs Five
## 2300 Spades King Clubs Four
## 2301 Spades King Clubs Jack
## 2302 Spades King Clubs King
## 2303 Spades King Clubs Nine
## 2304 Spades King Clubs Queen
## 2305 Spades King Clubs Seven
## 2306 Spades King Clubs Six
## 2307 Spades King Clubs Ten
## 2308 Spades King Clubs Three
## 2309 Spades King Diamonds Ace
## 2310 Spades King Diamonds Deuce
## 2311 Spades King Diamonds Eight
## 2312 Spades King Diamonds Five
## 2313 Spades King Diamonds Four
## 2314 Spades King Diamonds Jack
## 2315 Spades King Diamonds King
## 2316 Spades King Diamonds Nine
## 2317 Spades King Diamonds Queen
## 2318 Spades King Diamonds Seven
## 2319 Spades King Diamonds Six
## 2320 Spades King Diamonds Ten
## 2321 Spades King Diamonds Three
## 2322 Spades King Hearts Ace
## 2323 Spades King Hearts Deuce
## 2324 Spades King Hearts Eight
## 2325 Spades King Hearts Five
## 2326 Spades King Hearts Four
## 2327 Spades King Hearts Jack
## 2328 Spades King Hearts King
## 2329 Spades King Hearts Nine
## 2330 Spades King Hearts Queen
## 2331 Spades King Hearts Seven
## 2332 Spades King Hearts Six
## 2333 Spades King Hearts Ten
## 2334 Spades King Hearts Three
## 2335 Spades King Spades Ace
## 2336 Spades King Spades Deuce
## 2337 Spades King Spades Eight
## 2338 Spades King Spades Five
## 2339 Spades King Spades Four
## 2340 Spades King Spades Jack
## 2341 Spades King Spades Nine
## 2342 Spades King Spades Queen
## 2343 Spades King Spades Seven
## 2344 Spades King Spades Six
## 2345 Spades King Spades Ten
## 2346 Spades King Spades Three
## 2347 Spades Nine Clubs Ace
## 2348 Spades Nine Clubs Deuce
## 2349 Spades Nine Clubs Eight
## 2350 Spades Nine Clubs Five
## 2351 Spades Nine Clubs Four
## 2352 Spades Nine Clubs Jack
## 2353 Spades Nine Clubs King
## 2354 Spades Nine Clubs Nine
## 2355 Spades Nine Clubs Queen
## 2356 Spades Nine Clubs Seven
## 2357 Spades Nine Clubs Six
## 2358 Spades Nine Clubs Ten
## 2359 Spades Nine Clubs Three
## 2360 Spades Nine Diamonds Ace
## 2361 Spades Nine Diamonds Deuce
## 2362 Spades Nine Diamonds Eight
## 2363 Spades Nine Diamonds Five
## 2364 Spades Nine Diamonds Four
## 2365 Spades Nine Diamonds Jack
## 2366 Spades Nine Diamonds King
## 2367 Spades Nine Diamonds Nine
## 2368 Spades Nine Diamonds Queen
## 2369 Spades Nine Diamonds Seven
## 2370 Spades Nine Diamonds Six
## 2371 Spades Nine Diamonds Ten
## 2372 Spades Nine Diamonds Three
## 2373 Spades Nine Hearts Ace
## 2374 Spades Nine Hearts Deuce
## 2375 Spades Nine Hearts Eight
## 2376 Spades Nine Hearts Five
## 2377 Spades Nine Hearts Four
## 2378 Spades Nine Hearts Jack
## 2379 Spades Nine Hearts King
## 2380 Spades Nine Hearts Nine
## 2381 Spades Nine Hearts Queen
## 2382 Spades Nine Hearts Seven
## 2383 Spades Nine Hearts Six
## 2384 Spades Nine Hearts Ten
## 2385 Spades Nine Hearts Three
## 2386 Spades Nine Spades Ace
## 2387 Spades Nine Spades Deuce
## 2388 Spades Nine Spades Eight
## 2389 Spades Nine Spades Five
## 2390 Spades Nine Spades Four
## 2391 Spades Nine Spades Jack
## 2392 Spades Nine Spades King
## 2393 Spades Nine Spades Queen
## 2394 Spades Nine Spades Seven
## 2395 Spades Nine Spades Six
## 2396 Spades Nine Spades Ten
## 2397 Spades Nine Spades Three
## 2398 Spades Queen Clubs Ace
## 2399 Spades Queen Clubs Deuce
## 2400 Spades Queen Clubs Eight
## 2401 Spades Queen Clubs Five
## 2402 Spades Queen Clubs Four
## 2403 Spades Queen Clubs Jack
## 2404 Spades Queen Clubs King
## 2405 Spades Queen Clubs Nine
## 2406 Spades Queen Clubs Queen
## 2407 Spades Queen Clubs Seven
## 2408 Spades Queen Clubs Six
## 2409 Spades Queen Clubs Ten
## 2410 Spades Queen Clubs Three
## 2411 Spades Queen Diamonds Ace
## 2412 Spades Queen Diamonds Deuce
## 2413 Spades Queen Diamonds Eight
## 2414 Spades Queen Diamonds Five
## 2415 Spades Queen Diamonds Four
## 2416 Spades Queen Diamonds Jack
## 2417 Spades Queen Diamonds King
## 2418 Spades Queen Diamonds Nine
## 2419 Spades Queen Diamonds Queen
## 2420 Spades Queen Diamonds Seven
## 2421 Spades Queen Diamonds Six
## 2422 Spades Queen Diamonds Ten
## 2423 Spades Queen Diamonds Three
## 2424 Spades Queen Hearts Ace
## 2425 Spades Queen Hearts Deuce
## 2426 Spades Queen Hearts Eight
## 2427 Spades Queen Hearts Five
## 2428 Spades Queen Hearts Four
## 2429 Spades Queen Hearts Jack
## 2430 Spades Queen Hearts King
## 2431 Spades Queen Hearts Nine
## 2432 Spades Queen Hearts Queen
## 2433 Spades Queen Hearts Seven
## 2434 Spades Queen Hearts Six
## 2435 Spades Queen Hearts Ten
## 2436 Spades Queen Hearts Three
## 2437 Spades Queen Spades Ace
## 2438 Spades Queen Spades Deuce
## 2439 Spades Queen Spades Eight
## 2440 Spades Queen Spades Five
## 2441 Spades Queen Spades Four
## 2442 Spades Queen Spades Jack
## 2443 Spades Queen Spades King
## 2444 Spades Queen Spades Nine
## 2445 Spades Queen Spades Seven
## 2446 Spades Queen Spades Six
## 2447 Spades Queen Spades Ten
## 2448 Spades Queen Spades Three
## 2449 Spades Seven Clubs Ace
## 2450 Spades Seven Clubs Deuce
## 2451 Spades Seven Clubs Eight
## 2452 Spades Seven Clubs Five
## 2453 Spades Seven Clubs Four
## 2454 Spades Seven Clubs Jack
## 2455 Spades Seven Clubs King
## 2456 Spades Seven Clubs Nine
## 2457 Spades Seven Clubs Queen
## 2458 Spades Seven Clubs Seven
## 2459 Spades Seven Clubs Six
## 2460 Spades Seven Clubs Ten
## 2461 Spades Seven Clubs Three
## 2462 Spades Seven Diamonds Ace
## 2463 Spades Seven Diamonds Deuce
## 2464 Spades Seven Diamonds Eight
## 2465 Spades Seven Diamonds Five
## 2466 Spades Seven Diamonds Four
## 2467 Spades Seven Diamonds Jack
## 2468 Spades Seven Diamonds King
## 2469 Spades Seven Diamonds Nine
## 2470 Spades Seven Diamonds Queen
## 2471 Spades Seven Diamonds Seven
## 2472 Spades Seven Diamonds Six
## 2473 Spades Seven Diamonds Ten
## 2474 Spades Seven Diamonds Three
## 2475 Spades Seven Hearts Ace
## 2476 Spades Seven Hearts Deuce
## 2477 Spades Seven Hearts Eight
## 2478 Spades Seven Hearts Five
## 2479 Spades Seven Hearts Four
## 2480 Spades Seven Hearts Jack
## 2481 Spades Seven Hearts King
## 2482 Spades Seven Hearts Nine
## 2483 Spades Seven Hearts Queen
## 2484 Spades Seven Hearts Seven
## 2485 Spades Seven Hearts Six
## 2486 Spades Seven Hearts Ten
## 2487 Spades Seven Hearts Three
## 2488 Spades Seven Spades Ace
## 2489 Spades Seven Spades Deuce
## 2490 Spades Seven Spades Eight
## 2491 Spades Seven Spades Five
## 2492 Spades Seven Spades Four
## 2493 Spades Seven Spades Jack
## 2494 Spades Seven Spades King
## 2495 Spades Seven Spades Nine
## 2496 Spades Seven Spades Queen
## 2497 Spades Seven Spades Six
## 2498 Spades Seven Spades Ten
## 2499 Spades Seven Spades Three
## 2500 Spades Six Clubs Ace
## 2501 Spades Six Clubs Deuce
## 2502 Spades Six Clubs Eight
## 2503 Spades Six Clubs Five
## 2504 Spades Six Clubs Four
## 2505 Spades Six Clubs Jack
## 2506 Spades Six Clubs King
## 2507 Spades Six Clubs Nine
## 2508 Spades Six Clubs Queen
## 2509 Spades Six Clubs Seven
## 2510 Spades Six Clubs Six
## 2511 Spades Six Clubs Ten
## 2512 Spades Six Clubs Three
## 2513 Spades Six Diamonds Ace
## 2514 Spades Six Diamonds Deuce
## 2515 Spades Six Diamonds Eight
## 2516 Spades Six Diamonds Five
## 2517 Spades Six Diamonds Four
## 2518 Spades Six Diamonds Jack
## 2519 Spades Six Diamonds King
## 2520 Spades Six Diamonds Nine
## 2521 Spades Six Diamonds Queen
## 2522 Spades Six Diamonds Seven
## 2523 Spades Six Diamonds Six
## 2524 Spades Six Diamonds Ten
## 2525 Spades Six Diamonds Three
## 2526 Spades Six Hearts Ace
## 2527 Spades Six Hearts Deuce
## 2528 Spades Six Hearts Eight
## 2529 Spades Six Hearts Five
## 2530 Spades Six Hearts Four
## 2531 Spades Six Hearts Jack
## 2532 Spades Six Hearts King
## 2533 Spades Six Hearts Nine
## 2534 Spades Six Hearts Queen
## 2535 Spades Six Hearts Seven
## 2536 Spades Six Hearts Six
## 2537 Spades Six Hearts Ten
## 2538 Spades Six Hearts Three
## 2539 Spades Six Spades Ace
## 2540 Spades Six Spades Deuce
## 2541 Spades Six Spades Eight
## 2542 Spades Six Spades Five
## 2543 Spades Six Spades Four
## 2544 Spades Six Spades Jack
## 2545 Spades Six Spades King
## 2546 Spades Six Spades Nine
## 2547 Spades Six Spades Queen
## 2548 Spades Six Spades Seven
## 2549 Spades Six Spades Ten
## 2550 Spades Six Spades Three
## 2551 Spades Ten Clubs Ace
## 2552 Spades Ten Clubs Deuce
## 2553 Spades Ten Clubs Eight
## 2554 Spades Ten Clubs Five
## 2555 Spades Ten Clubs Four
## 2556 Spades Ten Clubs Jack
## 2557 Spades Ten Clubs King
## 2558 Spades Ten Clubs Nine
## 2559 Spades Ten Clubs Queen
## 2560 Spades Ten Clubs Seven
## 2561 Spades Ten Clubs Six
## 2562 Spades Ten Clubs Ten
## 2563 Spades Ten Clubs Three
## 2564 Spades Ten Diamonds Ace
## 2565 Spades Ten Diamonds Deuce
## 2566 Spades Ten Diamonds Eight
## 2567 Spades Ten Diamonds Five
## 2568 Spades Ten Diamonds Four
## 2569 Spades Ten Diamonds Jack
## 2570 Spades Ten Diamonds King
## 2571 Spades Ten Diamonds Nine
## 2572 Spades Ten Diamonds Queen
## 2573 Spades Ten Diamonds Seven
## 2574 Spades Ten Diamonds Six
## 2575 Spades Ten Diamonds Ten
## 2576 Spades Ten Diamonds Three
## 2577 Spades Ten Hearts Ace
## 2578 Spades Ten Hearts Deuce
## 2579 Spades Ten Hearts Eight
## 2580 Spades Ten Hearts Five
## 2581 Spades Ten Hearts Four
## 2582 Spades Ten Hearts Jack
## 2583 Spades Ten Hearts King
## 2584 Spades Ten Hearts Nine
## 2585 Spades Ten Hearts Queen
## 2586 Spades Ten Hearts Seven
## 2587 Spades Ten Hearts Six
## 2588 Spades Ten Hearts Ten
## 2589 Spades Ten Hearts Three
## 2590 Spades Ten Spades Ace
## 2591 Spades Ten Spades Deuce
## 2592 Spades Ten Spades Eight
## 2593 Spades Ten Spades Five
## 2594 Spades Ten Spades Four
## 2595 Spades Ten Spades Jack
## 2596 Spades Ten Spades King
## 2597 Spades Ten Spades Nine
## 2598 Spades Ten Spades Queen
## 2599 Spades Ten Spades Seven
## 2600 Spades Ten Spades Six
## 2601 Spades Ten Spades Three
## 2602 Spades Three Clubs Ace
## 2603 Spades Three Clubs Deuce
## 2604 Spades Three Clubs Eight
## 2605 Spades Three Clubs Five
## 2606 Spades Three Clubs Four
## 2607 Spades Three Clubs Jack
## 2608 Spades Three Clubs King
## 2609 Spades Three Clubs Nine
## 2610 Spades Three Clubs Queen
## 2611 Spades Three Clubs Seven
## 2612 Spades Three Clubs Six
## 2613 Spades Three Clubs Ten
## 2614 Spades Three Clubs Three
## 2615 Spades Three Diamonds Ace
## 2616 Spades Three Diamonds Deuce
## 2617 Spades Three Diamonds Eight
## 2618 Spades Three Diamonds Five
## 2619 Spades Three Diamonds Four
## 2620 Spades Three Diamonds Jack
## 2621 Spades Three Diamonds King
## 2622 Spades Three Diamonds Nine
## 2623 Spades Three Diamonds Queen
## 2624 Spades Three Diamonds Seven
## 2625 Spades Three Diamonds Six
## 2626 Spades Three Diamonds Ten
## 2627 Spades Three Diamonds Three
## 2628 Spades Three Hearts Ace
## 2629 Spades Three Hearts Deuce
## 2630 Spades Three Hearts Eight
## 2631 Spades Three Hearts Five
## 2632 Spades Three Hearts Four
## 2633 Spades Three Hearts Jack
## 2634 Spades Three Hearts King
## 2635 Spades Three Hearts Nine
## 2636 Spades Three Hearts Queen
## 2637 Spades Three Hearts Seven
## 2638 Spades Three Hearts Six
## 2639 Spades Three Hearts Ten
## 2640 Spades Three Hearts Three
## 2641 Spades Three Spades Ace
## 2642 Spades Three Spades Deuce
## 2643 Spades Three Spades Eight
## 2644 Spades Three Spades Five
## 2645 Spades Three Spades Four
## 2646 Spades Three Spades Jack
## 2647 Spades Three Spades King
## 2648 Spades Three Spades Nine
## 2649 Spades Three Spades Queen
## 2650 Spades Three Spades Seven
## 2651 Spades Three Spades Six
## 2652 Spades Three Spades Ten
all_phone_numbers <- permutations(10, 7, v=0:9)
n <- nrow(all_phone_numbers)
index <- sample(n, 5)
all_phone_numbers[index,]
## [,1] [,2] [,3] [,4] [,5] [,6] [,7]
## [1,] 4 8 2 7 0 3 1
## [2,] 2 0 8 7 3 4 6
## [3,] 6 0 9 3 7 2 1
## [4,] 3 2 8 4 7 1 6
## [5,] 5 9 8 7 3 6 0
library(gtools)
suits <- c("Diamonds", "Clubs", "Hearts", "Spades")
numbers <- c("Ace", "Deuce", "Three", "Four", "Five", "Six", "Seven", "Eight", "Nine", "Ten", "Jack", "Queen", "King")
deck <- expand.grid(suit = suits, number = numbers)
deck <- paste(deck$suit, deck$number)
deck
## [1] "Diamonds Ace" "Clubs Ace" "Hearts Ace" "Spades Ace"
## [5] "Diamonds Deuce" "Clubs Deuce" "Hearts Deuce" "Spades Deuce"
## [9] "Diamonds Three" "Clubs Three" "Hearts Three" "Spades Three"
## [13] "Diamonds Four" "Clubs Four" "Hearts Four" "Spades Four"
## [17] "Diamonds Five" "Clubs Five" "Hearts Five" "Spades Five"
## [21] "Diamonds Six" "Clubs Six" "Hearts Six" "Spades Six"
## [25] "Diamonds Seven" "Clubs Seven" "Hearts Seven" "Spades Seven"
## [29] "Diamonds Eight" "Clubs Eight" "Hearts Eight" "Spades Eight"
## [33] "Diamonds Nine" "Clubs Nine" "Hearts Nine" "Spades Nine"
## [37] "Diamonds Ten" "Clubs Ten" "Hearts Ten" "Spades Ten"
## [41] "Diamonds Jack" "Clubs Jack" "Hearts Jack" "Spades Jack"
## [45] "Diamonds Queen" "Clubs Queen" "Hearts Queen" "Spades Queen"
## [49] "Diamonds King" "Clubs King" "Hearts King" "Spades King"
hands <- permutations(52, 2, v = deck) # ===========================================================================
length(hands[, 1])
## [1] 2652
n = nrow(hands)
index <- sample(n, 6) # ===========================================================================================
hands[index, ]
## [,1] [,2]
## [1,] "Hearts Queen" "Clubs Three"
## [2,] "Clubs Queen" "Hearts Ten"
## [3,] "Hearts Three" "Diamonds Nine"
## [4,] "Hearts Seven" "Spades Deuce"
## [5,] "Spades Nine" "Spades Four"
## [6,] "Clubs Three" "Hearts Four"
first_card <- hands[, 1]
second_card <- hands[, 2]
head(second_card)
## [1] "Clubs Deuce" "Clubs Eight" "Clubs Five" "Clubs Four" "Clubs Jack"
## [6] "Clubs King"
length(unique(first_card))
## [1] 52
# first_card %in% kings # Thank God I tried this code, and find the causation of wrong code
sum(first_card %in% kings)
## [1] 204
sum(first_card %in% kings & second_card %in% kings)/sum(first_card %in% kings)
## [1] 0.05882353
Yes, this image has to be here
combinations(3, 2)
## [,1] [,2]
## [1,] 1 2
## [2,] 1 3
## [3,] 2 3
permutations(3, 2)
## [,1] [,2]
## [1,] 1 2
## [2,] 1 3
## [3,] 2 1
## [4,] 2 3
## [5,] 3 1
## [6,] 3 2
suits
## [1] "Diamonds" "Clubs" "Hearts" "Spades"
aces <- paste("Ace", suits)
aces
## [1] "Ace Diamonds" "Ace Clubs" "Ace Hearts" "Ace Spades"
facedcard <- c("Ten", "Jack", "Queen", "King")
facedcard_combine <- expand.grid(faces = facedcard, suit = suits)
facedcard_combine <- paste(facedcard_combine$faces, facedcard_combine$suit)
facedcard_combine
## [1] "Ten Diamonds" "Jack Diamonds" "Queen Diamonds" "King Diamonds"
## [5] "Ten Clubs" "Jack Clubs" "Queen Clubs" "King Clubs"
## [9] "Ten Hearts" "Jack Hearts" "Queen Hearts" "King Hearts"
## [13] "Ten Spades" "Jack Spades" "Queen Spades" "King Spades"
suits <- c("Diamonds", "Clubs", "Hearts", "Spades")
numbers <- c("Ace", "Deuce", "Three", "Four", "Five", "Six", "Seven", "Eight", "Nine", "Ten", "Jack", "Queen", "King")
deck <- expand.grid(suit = suits, number = numbers)
deck <- paste(deck$number, deck$suit)
all_hands <- permutations(52, 2, v = deck) # ==================================================================================
head(all_hands) # First finish this approach, and Notice in Blackjack the natural 21 means card not order
## [,1] [,2]
## [1,] "Ace Clubs" "Ace Diamonds"
## [2,] "Ace Clubs" "Ace Hearts"
## [3,] "Ace Clubs" "Ace Spades"
## [4,] "Ace Clubs" "Deuce Clubs"
## [5,] "Ace Clubs" "Deuce Diamonds"
## [6,] "Ace Clubs" "Deuce Hearts"
# I'll apply the conditional probability equations here: Pr(A and B) = Pr(A) * Pr(B|A)
natural21 <- mean(all_hands[, 1] %in% aces) * sum(all_hands[, 1] %in% aces & all_hands[, 2] %in% facedcard_combine)/sum(all_hands[, 1] %in% aces)
natural21
## [1] 0.02413273
suits <- c("Clubs", "Diamonds", "Hearts", "Spades")
aces <- paste("Ace", suits)
aces
## [1] "Ace Clubs" "Ace Diamonds" "Ace Hearts" "Ace Spades"
facedcard <- c("Ten", "Jack", "Queen", "King")
facedcard_combine <- expand.grid(faces = facedcard, suit = suits)
facedcard_combine <- paste(facedcard_combine$faces, facedcard_combine$suit)
facedcard_combine
## [1] "Ten Clubs" "Jack Clubs" "Queen Clubs" "King Clubs"
## [5] "Ten Diamonds" "Jack Diamonds" "Queen Diamonds" "King Diamonds"
## [9] "Ten Hearts" "Jack Hearts" "Queen Hearts" "King Hearts"
## [13] "Ten Spades" "Jack Spades" "Queen Spades" "King Spades"
suits <- c("Diamonds", "Clubs", "Hearts", "Spades")
numbers <- c("Ace", "Deuce", "Three", "Four", "Five", "Six", "Seven", "Eight", "Nine", "Ten", "Jack", "Queen", "King")
deck <- expand.grid(suit = suits, number = numbers)
deck <- paste(deck$number, deck$suit)
hands <- combinations(52, 2, v = deck)
length(hands)
## [1] 2652
mean(hands[, 1] %in% aces & hands[, 2] %in% facedcard_combine)
## [1] 0.04826546
mean(hands[, 1] %in% aces & hands[, 2] %in% facedcard_combine) + mean(hands[, 1] %in% facedcard_combine & hands[, 2] %in% aces)
## [1] 0.04826546
# ===============================================================================================================================
# Here we should notice how the combination function works
mean((hands[, 1] %in% aces & hands[, 2] %in% facedcard_combine) | (hands[, 1] %in% facedcard_combine & hands[, 2] %in% aces))
## [1] 0.04826546
hands <- sample(deck, 2)
hands
## [1] "Four Clubs" "Jack Diamonds"
B <- 100000
result <- replicate(B, {
hand <- sample(deck, 2)
(hand[1] %in% aces & hand[2] %in% facedcard_combine) |
hand[2] %in% aces & hand[1] %in% facedcard_combine})
mean(result)
## [1] 0.04825
now, how about the second card being a king, given that the first card is king ??? Think about it
Note: these functions are available in gtools package
Notice: here the order maters, and once we pick a number, it cant appear again
But be careful how combination function wroks, as this code seems counterintuitive
Suppose you’re in a classroom with 50 people. If we assume this is a randomly selected group, what is the chance that at least two people have the same birthday? Although it is somewhat advanced, we can actually deduce this mathematically, and we do this later, but now, we’re going to use Monte Carlo simulations. For simplicity, we assumed that nobody was born on February 29th. This actually doesn’t change the answer much.
All right, first, note that birthdays can be represented as numbers between 1 and 365. So a sample of 50 random birthdays can be obtained simply using the sample function, like this. To check if, in this particular set of 50 people we have at least two with the same birthday, we can use the function duplicated, which returns true whenever an element of a vector has already appeared in that vector. So here’s an example. If I type duplicated 1, 2, 3, 1, 4, 3, 5, , we get true’s for the 1 and the 3 the second time they appear. So to check if two birthdays were the same, we simply use any and duplicated functions, like this. And in the case that we just generated, we actually do have this happening. We did have two people, at least two people, with the same birthday. We get true. Now, to estimate the probability, we’re going to repeat this experiment. We’re going to run a Monte Carlo simulation over and over again.
So what we do is we do it 10,000 times. We use the replicate function like this. And when we’re done, we get that the probability of having two people, at least two people, with the same birthday in a group of 50 people is about 98%. Were you expecting this to be so high? People tend to underestimate these probabilities, so [][it might be an opportunity for you to bet and make some money off of your friends] (key point of this course, please keep in mind). To get an intuition as to why this is so high, think of what happens as you get close to 365 people. At this stage, we run out of days, and the probability is 1. In the next video, we’re going to actually compute this probability for different group sizes and see how fast it gets close to 1.
[][Textbook link]
Here is a link to the textbook section on the birthday problem External link. https://rafalab.github.io/dsbook/probability.html#birthday-problem
[][Key points]
duplicated() takes a vector and returns a vector of the same length with TRUE for any elements that have appeared previously in that vector.
We can compute the probability of shared birthdays in a group of people by modeling birthdays as random draws from the numbers 1 through 365. We can then use this sampling model of birthdays to run a Monte Carlo simulation to estimate the probability of shared birthdays.
Code: The birthday problem
n <- 50 bdays <- sample(1:365, n, replace = TRUE) # generate n random birthdays any(duplicated(bdays)) # check if any birthdays are duplicated
B <- 10000 results <- replicate(B, { # returns vector of B logical values bdays <- sample(1:365, n, replace = TRUE) any(duplicated(bdays)) }) mean(results) # calculates proportion of groups with duplicated bdays
birthdays <- sample(1:365, 50, replace = T)
length(unique(birthdays)) # So we do have the same birthday classmates in a 50 sized class, should repeat it many times and simulate the %
## [1] 44
mean(birthdays %in% unique(birthdays))
## [1] 1
birthdaycheck <- replicate(100000, {
same <- sample(365, 50, replace = T)
50 - length(unique(same)) >=1 # I haven't learn the course, did I doing it wrong or something? Why its so high ???
})
mean(birthdaycheck)
## [1] 0.9706
Say you want to use what you’ve just learned about the birthday
problem to bet with friends about two people having the same birthday in
a group of people. [][When are the chances larger than 50%? Larger
than 75%? ] Let’s create a lookup table. We can quickly create a
function to compute this for any group. We write the function like this.
We’ll call it compute prob, and we’ll basically make the calculations
for the probability of two people having the same birthday. We will use
a small Monte Carlo simulation to do it. Now that we’ve done this, we
want to compute this function, we want to apply this function to several
values of n, let’s say from 1 to 60.
Let’s define n as a sequence starting at 1 and ending at 60. Now, we can
use a for loop to apply this function to each value in n, but it turns
out that for loops are rarely the preferred approach in R. In general,
we try to perform operations on entire vectors. Arithmetic operations,
for example, operate on vectors in an element wise fashion. We saw this
when we learned about R. So if we type x equals 1 through 10, now X is
the vector starting at 1 and ending at 10, and we compute the square
root of x, it actually computes the square root for each element.
Equally, if we define y to be 1 through 10, and then multiply x by y, it
multiplies each element 1 by 1– 1 times 1, 2 times 2, et cetera. So
there’s really no need for for loops. But not all functions work this
way. You can’t just send a vector to any function in R. For example, the
function we just wrote does not work element-wise since it’s expecting a
scalar, it’s expecting an n. This piece of code does not do what we
want. If we type compute prob and send it the vector n, we will not get
what we want. We will get just one number. What we can do instead is use
the function sapply. sapply permits us to perform element-wise
operations on any function. Here’s how it works. We’ll define a simple
example for the vector 1 through 10. If we want to apply the square
roots of each element of x, we can simply type sapply x comma square
root, and it’ll apply square root to each element of x. Of course, we
don’t need to do this because square root already does that, but we are
using it as a simple example. So for our case, we can simply type prob
equals sapply n– n is our vector– and then the function we define
compute prob. And this will assign to each element of prob the
probability of two people having the same birthday for that n. And now
we can very quickly make a plot. We plot the probability of two people
having the same birthday against the size of the group. Now, let’s
compute the exact probabilities rather than use Monte Carlo simulations.
The function we just defined uses a Monte Carlo simulation, but we can
use what we’ve learned about probability theory to compute the exact
value. Not only do we get the exact answer using math, but the
computations are much faster since we don’t have to generate
experiments. We simply get a number. To make the math simpler for this
particular problem, instead of computing the probability of it
happening, we’ll compute the probability of it not happening, and then
we can use the multiplication rule. Let’s start with the first person.
The probability that person 1 has a unique birthday is 1, of course. All
right. Now let’s move on to the second one. The probability that the
second person has a unique birthday given that person 1 already took one
of the days is 364 divided by 365. Then for a person 3, given that the
first two people already have unique birthdays, that leaves 363. So now
that probability is 363 divided by 365. If we continue this way and find
the chances of all, say, 50 people having unique birthdays, we would
multiply 1 times 364 divided by 365, times 363 divided by 365, dot dot
dot, all the way to the 50th element. Here’s the equation. Now, we can
easily write a function that does this. This time we’ll call it exact
prob. It takes n as a argument, and it computes this probability using
this simple code. Now we can compute each probability for each n using
sapply again, like this. And if we plot it, we can see that the Monte
Carlo simulations were almost exactly right. They were almost exact
approximations of the actual value. Now, notice had it not been possible
to compute the exact probabilities, something that sometimes happens, we
would have still been able to accurately estimate the probabilities
using Monte Carlo.
library(tidyverse)
## -- Attaching packages --------------------------------------- tidyverse 1.3.1 --
## v ggplot2 3.3.6 v purrr 0.3.4
## v tibble 3.1.7 v dplyr 1.0.9
## v tidyr 1.2.0 v stringr 1.4.0
## v readr 2.1.2 v forcats 0.5.1
## -- Conflicts ------------------------------------------ tidyverse_conflicts() --
## x dplyr::filter() masks stats::filter()
## x dplyr::lag() masks stats::lag()
compute_prob <- function(n, B = 100000){
same_day <- replicate(B, { # We are applying a Monte Carlo simulation, obviously we need replicate function
bdays <- sample(1:365, n, replace = T)
any(duplicated(bdays))
})
mean(same_day)
}
compute_prob(23) # Can you believe it, I got one shoot and get the correct answer 50%
## [1] 0.50619
# The power of replacement, how interesting ???
# ===============================================================================================================================
# Get prepared, womeday we may need to write a R function for later use
# ===============================================================================================================================
n <- seq(1, 30)
sapply(n, compute_prob) # =========================================================================================================
## [1] 0.00000 0.00256 0.00825 0.01695 0.02719 0.04139 0.05562 0.07353 0.09642
## [10] 0.11613 0.14081 0.16415 0.19438 0.22401 0.25248 0.28394 0.31512 0.34712
## [19] 0.37605 0.41005 0.44442 0.47577 0.50685 0.53867 0.57103 0.60034 0.62618
## [28] 0.65568 0.68057 0.70642
plot(sapply(n, compute_prob))
exact_prob <- function(n){ # =============================================================================================
prob_unique <- seq(365, 365-n+1)/365 # What does this line of code doing ???
1 - prod(prob_unique) # prod stands for product calculation
}
exact_prob(23)
## [1] 0.5072972
eprob <- sapply(60, exact_prob) # Using sappy() a sequence with defined function, but inside the function, seq() already did element wise
# ========================================================================================================
eprob
## [1] 0.9941227
ff <- seq(365, 300)
ff
## [1] 365 364 363 362 361 360 359 358 357 356 355 354 353 352 351 350 349 348 347
## [20] 346 345 344 343 342 341 340 339 338 337 336 335 334 333 332 331 330 329 328
## [39] 327 326 325 324 323 322 321 320 319 318 317 316 315 314 313 312 311 310 309
## [58] 308 307 306 305 304 303 302 301 300
n <- seq(1: 60) # ==================================================================================================================
prob <- sapply(n, compute_prob) ##############
exact_prob <- function(n){ # =============================================================================================
prob_unique <- seq(365, 365-n+1)/365 # What does this line of code doing ???
1 - prod(prob_unique) # prod stands for product calculation
}
eprob <- sapply(n, exact_prob) ##############
plot(n, prob)
lines(n, eprob, col = "red")
This image ment to be here
On any function
break thought into tensors and approaching the solution.png
Now you must can understand this, this is the bridge